r key sets aft overhead view
This commit is contained in:
parent
8deaa1720e
commit
5f14547ac9
2 changed files with 34 additions and 2 deletions
|
@ -4223,8 +4223,8 @@
|
|||
</binding>
|
||||
</key>
|
||||
<key n="114">
|
||||
<name>r</name>
|
||||
<desc>MCDU</desc>
|
||||
<name>o</name>
|
||||
<desc>Change view to aft overhead</desc>
|
||||
<binding>
|
||||
<condition>
|
||||
<property>/FMGC/keyboard-left</property>
|
||||
|
@ -4239,6 +4239,15 @@
|
|||
<command>nasal</command>
|
||||
<script>mcdu.button("R", 1);</script>
|
||||
</binding>
|
||||
<repeatable type="bool">true</repeatable>
|
||||
<binding>
|
||||
<condition>
|
||||
<not><property>/FMGC/keyboard-left</property></not>
|
||||
<not><property>/FMGC/keyboard-right</property></not>
|
||||
</condition>
|
||||
<command>nasal</command>
|
||||
<script>libraries.aftOverheadView();</script>
|
||||
</binding>
|
||||
</key>
|
||||
<key n="115">
|
||||
<name>s</name>
|
||||
|
|
|
@ -44,6 +44,29 @@ var resetView = func() {
|
|||
}
|
||||
}
|
||||
|
||||
var aftOverheadView = func() {
|
||||
if (pts.Sim.CurrentView.viewNumberRaw.getValue() == 0) {
|
||||
if (pts.Sim.Rendering.Headshake.enabled.getBoolValue()) {
|
||||
shakeFlag = 1;
|
||||
pts.Sim.Rendering.Headshake.enabled.setBoolValue(0);
|
||||
} else {
|
||||
shakeFlag = 0;
|
||||
}
|
||||
|
||||
pts.Sim.CurrentView.fieldOfView.setValue(105.8);
|
||||
pts.Sim.CurrentView.headingOffsetDeg.setValue(360);
|
||||
pts.Sim.CurrentView.pitchOffsetDeg.setValue(63.7);
|
||||
pts.Sim.CurrentView.rollOffsetDeg.setValue(0);
|
||||
pts.Sim.CurrentView.xOffsetM.setValue(0);
|
||||
pts.Sim.CurrentView.yOffsetM.setValue(0.765);
|
||||
pts.Sim.CurrentView.zOffsetM.setValue(-15.563);
|
||||
|
||||
if (shakeFlag) {
|
||||
pts.Sim.Rendering.Headshake.enabled.setBoolValue(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var autopilotView = func() {
|
||||
if (pts.Sim.CurrentView.viewNumberRaw.getValue() == 0) {
|
||||
if (pts.Sim.Rendering.Headshake.enabled.getBoolValue()) {
|
||||
|
|
Loading…
Reference in a new issue