1
0
Fork 0

Merge branch 'dev' of github.com:legoboyvdlp/A320-family into dev

This commit is contained in:
Jonathan Redpath 2022-01-08 13:34:36 +00:00
commit abeb1bb3ea
2 changed files with 36 additions and 35 deletions

View file

@ -1521,7 +1521,39 @@
<!-- Cocktpit Door Switch -->
<animation>
<type>knob</type>
<type>slider</type>
<object-name>CockpitDoorSwitch</object-name>
<object-name>CockpitDoorSwitch.mark</object-name>
<property>controls/doors/doorc-switch</property>
<drag-direction>vertical</drag-direction>
<action>
<binding>
<command>property-adjust</command>
<property>controls/doors/doorc-switch</property>
<factor>-1</factor>
<min>-1</min>
<max>1</max>
<wrap>0</wrap>
</binding>
</action>
<release>
<binding>
<command>property-assign</command>
<property>controls/doors/doorc-switch</property>
<value>0</value>
</binding>
</release>
<hovered>
<binding>
<command>set-tooltip</command>
<tooltip-id>doorc-switch-lock</tooltip-id>
<label>Cockpit door switch</label>
</binding>
</hovered>
</animation>
<animation>
<type>rotate</type>
<object-name>CockpitDoorSwitch</object-name>
<object-name>CockpitDoorSwitch.mark</object-name>
<property>controls/doors/doorc-switch</property>
@ -1533,38 +1565,6 @@
<axis>
<object-name>CockpitDoorSwitch.axis</object-name>
</axis>
<action>
<binding>
<command>property-cycle</command>
<property>controls/doors/doorc-switch</property>
<value>-1</value>
<value>0</value>
<value>1</value>
<wrap>false</wrap>
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/switch1", 1);</script>
</binding>
</action>
<release>
<binding>
<command>property-assign</command>
<property>controls/doors/doorc-switch</property>
<value>0</value>
</binding>
<binding>
<command>nasal</command>
<script>setprop("sim/sounde/switch1", 1);</script>
</binding>
</release>
<hovered>
<binding>
<command>set-tooltip</command>
<tooltip-id>doorc-switch-lock</tooltip-id>
<label>Cockpit door switch</label>
</binding>
</hovered>
</animation>
<animation>

View file

@ -84,6 +84,7 @@ var triggerDoor = func(door, doorName, doorDesc) {
};
setlistener("/controls/doors/doorc-switch",func(a){
setprop("sim/sounde/switch1", 1);
if (systems.ELEC.Bus.dc1.getValue() > 25 or systems.ELEC.Bus.dc2.getValue() > 25) {
var pos = a.getValue();
var current = getprop("/sim/model/door-positions/doorc/lock-status");
@ -95,11 +96,11 @@ setlistener("/controls/doors/doorc-switch",func(a){
else if (pos == -1 and current == 1) { ## UNLOCK
settimer( func {
if (a.getValue() == pos) setprop("/sim/model/door-positions/doorc/lock-status",0);
},0.2);
},0.3);
}
#setprop("/sim/model/door-positions/doorc/lock-status",-9); ## FAULT
}
});
},0,0);
###########
# Systems #