update to left OHP
This commit is contained in:
parent
dea0613e12
commit
684259efbc
6 changed files with 312 additions and 4 deletions
|
@ -588,6 +588,7 @@
|
||||||
<IDG1 type="bool">0</IDG1>
|
<IDG1 type="bool">0</IDG1>
|
||||||
<IDG2 type="bool">0</IDG2>
|
<IDG2 type="bool">0</IDG2>
|
||||||
<ramair type="bool">0</ramair>
|
<ramair type="bool">0</ramair>
|
||||||
|
<maskman type="bool">0</maskman>
|
||||||
</protectors>
|
</protectors>
|
||||||
</OH>
|
</OH>
|
||||||
<pneumatic n="0">
|
<pneumatic n="0">
|
||||||
|
|
|
@ -6010,4 +6010,202 @@
|
||||||
</action>
|
</action>
|
||||||
</animation>
|
</animation>
|
||||||
|
|
||||||
|
<animation>
|
||||||
|
<type>pick</type>
|
||||||
|
<object-name>LeftRainTest</object-name>
|
||||||
|
<action>
|
||||||
|
<button>0</button>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>property-toggle</command>
|
||||||
|
<property>/controls/switches/LrainRpt</property>
|
||||||
|
</binding>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/sim/sounde/oh-btn", 1);</script>
|
||||||
|
</binding>
|
||||||
|
</action>
|
||||||
|
</animation>
|
||||||
|
|
||||||
|
<animation>
|
||||||
|
<type>pick</type>
|
||||||
|
<object-name>RightRainTest</object-name>
|
||||||
|
<action>
|
||||||
|
<button>0</button>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>property-toggle</command>
|
||||||
|
<property>/controls/switches/RrainRpt</property>
|
||||||
|
</binding>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/sim/sounde/oh-btn", 1);</script>
|
||||||
|
</binding>
|
||||||
|
</action>
|
||||||
|
</animation>
|
||||||
|
|
||||||
|
<animation>
|
||||||
|
<type>rotate</type>
|
||||||
|
<object-name>LeftWiperKnb</object-name>
|
||||||
|
<property>/controls/switches/wiperLspd</property>
|
||||||
|
<interpolation>
|
||||||
|
<entry><ind>-1</ind><dep>-50</dep></entry>
|
||||||
|
<entry><ind>0</ind><dep>0</dep></entry>
|
||||||
|
<entry><ind>1</ind><dep>50</dep></entry>
|
||||||
|
<entry><ind>2</ind><dep>100</dep></entry>
|
||||||
|
</interpolation>
|
||||||
|
<axis>
|
||||||
|
<x1-m>0.00608</x1-m>
|
||||||
|
<y1-m>-0.21485</y1-m>
|
||||||
|
<z1-m>-0.26721</z1-m>
|
||||||
|
<x2-m>0.00095</x2-m>
|
||||||
|
<y2-m>-0.21591</y2-m>
|
||||||
|
<z2-m>-0.26721</z2-m>
|
||||||
|
</axis>
|
||||||
|
</animation>
|
||||||
|
|
||||||
|
<animation>
|
||||||
|
<type>pick</type>
|
||||||
|
<object-name>LeftWiperKnb</object-name>
|
||||||
|
<action>
|
||||||
|
<button>0</button>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>property-toggle</command>
|
||||||
|
<property>/controls/switches/wiperLspd</property>
|
||||||
|
</binding>
|
||||||
|
</action>
|
||||||
|
</animation>
|
||||||
|
|
||||||
|
<animation>
|
||||||
|
<type>rotate</type>
|
||||||
|
<object-name>RightWiperKnb</object-name>
|
||||||
|
<property>/controls/switches/wiperLspd</property>
|
||||||
|
<interpolation>
|
||||||
|
<entry><ind>-1</ind><dep>-50</dep></entry>
|
||||||
|
<entry><ind>0</ind><dep>0</dep></entry>
|
||||||
|
<entry><ind>1</ind><dep>50</dep></entry>
|
||||||
|
<entry><ind>2</ind><dep>100</dep></entry>
|
||||||
|
</interpolation>
|
||||||
|
<axis>
|
||||||
|
<x1-m>0.00608</x1-m>
|
||||||
|
<y1-m>-0.21485</y1-m>
|
||||||
|
<z1-m>-0.26721</z1-m>
|
||||||
|
<x2-m>0.00095</x2-m>
|
||||||
|
<y2-m>-0.21591</y2-m>
|
||||||
|
<z2-m>-0.26721</z2-m>
|
||||||
|
</axis>
|
||||||
|
</animation>
|
||||||
|
|
||||||
|
<animation>
|
||||||
|
<type>pick</type>
|
||||||
|
<object-name>RightWiperKnb</object-name>
|
||||||
|
<action>
|
||||||
|
<button>0</button>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>property-toggle</command>
|
||||||
|
<property>/controls/switches/wiperRspd</property>
|
||||||
|
</binding>
|
||||||
|
</action>
|
||||||
|
</animation>
|
||||||
|
|
||||||
|
<animation>
|
||||||
|
<type>select</type>
|
||||||
|
<object-name>PassOxyInd1S</object-name>
|
||||||
|
<condition>
|
||||||
|
<equals>
|
||||||
|
<property>/controls/oxygen/masksSys</property>
|
||||||
|
<value>1</value>
|
||||||
|
</equals>
|
||||||
|
</condition>
|
||||||
|
</animation>
|
||||||
|
|
||||||
|
<animation>
|
||||||
|
<type>pick</type>
|
||||||
|
<object-name>PassOxyInd1S</object-name>
|
||||||
|
<action>
|
||||||
|
<button>0</button>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>property-toggle</command>
|
||||||
|
<property>/controls/oxygen/masksSys</property>
|
||||||
|
</binding>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/sim/sounde/oh-btn", 1);</script>
|
||||||
|
</binding>
|
||||||
|
</action>
|
||||||
|
</animation>
|
||||||
|
|
||||||
|
<animation>
|
||||||
|
<type>select</type>
|
||||||
|
<object-name>CrewOxyBtn2O</object-name>
|
||||||
|
<condition>
|
||||||
|
<equals>
|
||||||
|
<property>/controls/oxygen/crewOxyPB</property>
|
||||||
|
<value>1</value>
|
||||||
|
</equals>
|
||||||
|
</condition>
|
||||||
|
</animation>
|
||||||
|
|
||||||
|
<animation>
|
||||||
|
<type>pick</type>
|
||||||
|
<object-name>CrewOxyBtn2O</object-name>
|
||||||
|
<action>
|
||||||
|
<button>0</button>
|
||||||
|
<repeatable>false</repeatable>
|
||||||
|
<binding>
|
||||||
|
<command>property-toggle</command>
|
||||||
|
<property>/controls/oxygen/crewOxyPB</property>
|
||||||
|
</binding>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/sim/sounde/oh-btn", 1);</script>
|
||||||
|
</binding>
|
||||||
|
</action>
|
||||||
|
</animation>
|
||||||
|
|
||||||
|
<animation>
|
||||||
|
<type>rotate</type>
|
||||||
|
<object-name>MaskManOnGaurd</object-name>
|
||||||
|
<property>/controls/oxygen/masksGuard</property>
|
||||||
|
<interpolation>
|
||||||
|
<entry><ind>0</ind><dep>0</dep></entry>
|
||||||
|
<entry><ind>1</ind><dep>90</dep></entry>
|
||||||
|
</interpolation>
|
||||||
|
<axis>
|
||||||
|
<x1-m>0.00375</x1-m>
|
||||||
|
<y1-m>-0.27338</y1-m>
|
||||||
|
<z1-m>-0.15783</z1-m>
|
||||||
|
<x2-m>0.00228</x2-m>
|
||||||
|
<y2-m>-0.26147</y2-m>
|
||||||
|
<z2-m>-0.15783</z2-m>
|
||||||
|
</axis>
|
||||||
|
</animation>
|
||||||
|
|
||||||
|
<animation>
|
||||||
|
<type>pick</type>
|
||||||
|
<object-name>MaskManOnGaurd</object-name>
|
||||||
|
<action>
|
||||||
|
<button>1</button>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>controls/OH/protectors/maskman</property>
|
||||||
|
<value>1</value>
|
||||||
|
</binding>
|
||||||
|
<mod-up>
|
||||||
|
<binding>
|
||||||
|
<command>property-assign</command>
|
||||||
|
<property>controls/OH/protectors/maskman</property>
|
||||||
|
<value>0</value>
|
||||||
|
</binding>
|
||||||
|
<binding>
|
||||||
|
<command>nasal</command>
|
||||||
|
<script>setprop("/sim/sounde/oh-cover", 1);</script>
|
||||||
|
</binding>
|
||||||
|
</mod-up>
|
||||||
|
</action>
|
||||||
|
</animation>
|
||||||
|
|
||||||
</PropertyList>
|
</PropertyList>
|
|
@ -26,13 +26,75 @@ var variousReset = func {
|
||||||
setprop("/controls/CVR/gndctl", 0);
|
setprop("/controls/CVR/gndctl", 0);
|
||||||
setprop("/controls/CVR/erase", 0);
|
setprop("/controls/CVR/erase", 0);
|
||||||
setprop("/controls/switches/cabinfan", 1);
|
setprop("/controls/switches/cabinfan", 1);
|
||||||
|
setprop("/controls/oxygen/crewOxyPB", 0); # 0 = AUTO 1 = OFF
|
||||||
|
setprop("/controls/switches/emerCallLtO", 0); # ON light, flashes white for 10s
|
||||||
|
setprop("/controls/switches/emerCallLtC", 0); # CALL light, flashes amber for 10s
|
||||||
|
setprop("/controls/switches/emerCall", 0);
|
||||||
|
setprop("/controls/switches/LrainRpt", 0);
|
||||||
|
setprop("/controls/switches/RrainRpt", 0);
|
||||||
|
setprop("/controls/swithces/wiperLspd", 0); # -1 = INTM 0 = OFF 1 = LO 2 = HI
|
||||||
|
setprop("/controls/swithces/wiperRspd", 0); # -1 = INTM 0 = OFF 1 = LO 2 = HI
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setlistener("/sim/signals/fdm-initialized", func {
|
||||||
|
var stateL = getprop("/engines/engine[0]/state");
|
||||||
|
var stateR = getprop("/engines/engine[1]/state");
|
||||||
|
var Lrain = getprop("/controls/switches/LrainRpt");
|
||||||
|
var Rrain = getprop("/controls/switches/RrainRpt");
|
||||||
|
var OnLt = getprop("/controls/switches/emerCallLtO");
|
||||||
|
var CallLt = getprop("/controls/switches/emerCallLtC");
|
||||||
|
var wow = getprop("/gear/gear[1]/wow");
|
||||||
|
rainTimer.start();
|
||||||
|
});
|
||||||
|
|
||||||
|
# inhibit rain rpt when engines off and on ground
|
||||||
|
var rainRepel = func {
|
||||||
|
Lrain = getprop("/controls/switches/LrainRpt");
|
||||||
|
Rrain = getprop("/controls/switches/RrainRpt");
|
||||||
|
wow = getprop("/gear/gear[1]/wow");
|
||||||
|
stateL = getprop("/engines/engine[0]/state");
|
||||||
|
stateR = getprop("/engines/engine[1]/state");
|
||||||
|
if (Lrain and (stateL != 3 and stateR != 3 and wow)) {
|
||||||
|
setprop("/controls/switches/LrainRpt", 0);
|
||||||
|
}
|
||||||
|
if (Rrain and (stateL != 3 and stateR != 3 and wow)) {
|
||||||
|
setprop("/controls/switches/RrainRpt", 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var EmerCall = func {
|
||||||
|
setprop("/controls/switches/emerCall", 1);
|
||||||
|
EmerCallTimer1.start();
|
||||||
|
EmerCallTimer2.start();
|
||||||
|
settimer(func() {
|
||||||
|
setprop("/controls/switches/emerCall", 0);
|
||||||
|
EmerCallTimer1.stop();
|
||||||
|
EmerCallTimer2.stop();
|
||||||
|
}, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
var EmerCallOnLight = func {
|
||||||
|
OnLt = getprop("/controls/switches/emerCallLtO");
|
||||||
|
if (OnLt) {
|
||||||
|
setprop("/controls/switches/emerCallLtO", 0);
|
||||||
|
} else if (!OnLt) {
|
||||||
|
setprop("/controls/switches/emerCallLtO", 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var EmerCallLightCall = func {
|
||||||
|
CallLt = getprop("/controls/switches/emerCallLtC");
|
||||||
|
if (CallLt) {
|
||||||
|
setprop("/controls/switches/emerCallLtC", 0);
|
||||||
|
} else if (!CallLt) {
|
||||||
|
setprop("/controls/switches/emerCallLtC", 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var CabinCall = func {
|
var CabinCall = func {
|
||||||
setprop("/controls/switches/cabinCall", 1);
|
setprop("/controls/switches/emerCall", 0);
|
||||||
settimer(func() {
|
settimer(func() {
|
||||||
setprop("/controls/switches/cabinCall", 0);
|
setprop("/controls/switches/emerCall", 0);
|
||||||
}, 15);
|
}, 15);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,3 +233,6 @@ var update_CVR = func {
|
||||||
}
|
}
|
||||||
|
|
||||||
var CVR = maketimer(0.1, update_CVR);
|
var CVR = maketimer(0.1, update_CVR);
|
||||||
|
var EmerCallTimer1 = maketimer(0.5, EmerCallOnLight);
|
||||||
|
var EmerCallTimer2 = maketimer(0.5, EmerCallLightCall);
|
||||||
|
var rainTimer = maketimer(0.1, rainRepel);
|
|
@ -72,6 +72,9 @@ setlistener("/sim/signals/fdm-initialized", func {
|
||||||
var eng1on = getprop("/controls/deice/eng1-on");
|
var eng1on = getprop("/controls/deice/eng1-on");
|
||||||
var eng2on = getprop("/controls/deice/eng2-on");
|
var eng2on = getprop("/controls/deice/eng2-on");
|
||||||
var total_psi_calc = 0;
|
var total_psi_calc = 0;
|
||||||
|
var masks = getprop("/controls/oxygen/masksDeployMan");
|
||||||
|
var autoMasks = getprop("/controls/oxygen/masksDeploy");
|
||||||
|
var guard = getprop("/controls/oxygen/masksGuard");
|
||||||
});
|
});
|
||||||
|
|
||||||
var pneu_init = func {
|
var pneu_init = func {
|
||||||
|
@ -133,6 +136,10 @@ var pneu_init = func {
|
||||||
setprop("/systems/ventilation/lavatory/extractvalve", "0");
|
setprop("/systems/ventilation/lavatory/extractvalve", "0");
|
||||||
setprop("/controls/deice/eng1-on", 0);
|
setprop("/controls/deice/eng1-on", 0);
|
||||||
setprop("/controls/deice/eng2-on", 0);
|
setprop("/controls/deice/eng2-on", 0);
|
||||||
|
setprop("/controls/oxygen/masksDeploy", 0);
|
||||||
|
setprop("/controls/oxygen/masksDeployMan", 0);
|
||||||
|
setprop("/controls/oxygen/masksReset", 0); # this is the TMR RESET pb on the maintenance panel, needs 3D model
|
||||||
|
setprop("/controls/oxygen/masksSys", 0);
|
||||||
pneu_timer.start();
|
pneu_timer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -387,7 +394,27 @@ var flashfault2 = func {
|
||||||
settimer(func {
|
settimer(func {
|
||||||
setprop("/controls/deice/eng2-fault", 0);
|
setprop("/controls/deice/eng2-fault", 0);
|
||||||
}, 0.5);
|
}, 0.5);
|
||||||
|
|
||||||
|
# Oxygen (Cabin)
|
||||||
|
|
||||||
|
setlistener("/controls/oxygen/masksDeployMan", func {
|
||||||
|
if (guard and masks) {
|
||||||
|
setprop("/controls/oxygen/masksDeployMan", 0);
|
||||||
|
} else if (!guard and masks) {
|
||||||
|
setprop("/controls/oxygen/masksDeployMan", 1);
|
||||||
|
setprop("/controls/oxygen/masksDeploy", 1);
|
||||||
|
setprop("/controls/oxygen/masksSys", 1);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
if (cabinalt > 13500) {
|
||||||
|
setprop("/controls/oxygen/masksDeploy", 1);
|
||||||
|
setprop("/controls/oxygen/masksSys", 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# Update Function #
|
# Update Function #
|
||||||
|
|
|
@ -78,6 +78,23 @@
|
||||||
<max-dist>100.0</max-dist>
|
<max-dist>100.0</max-dist>
|
||||||
</announcement>
|
</announcement>
|
||||||
|
|
||||||
|
<announcement>
|
||||||
|
<name>EmerCall</name>
|
||||||
|
<mode>once</mode>
|
||||||
|
<path>tripleBelt.wav</path>
|
||||||
|
<condition>
|
||||||
|
<equals>
|
||||||
|
<property>/controls/switches/emerCall</property>
|
||||||
|
<value>1</value>
|
||||||
|
</equals>
|
||||||
|
</condition>
|
||||||
|
<volume>
|
||||||
|
<factor>8</factor>
|
||||||
|
</volume>
|
||||||
|
<reference-dist>20.0</reference-dist>
|
||||||
|
<max-dist>100.0</max-dist>
|
||||||
|
</announcement>
|
||||||
|
|
||||||
<callout>
|
<callout>
|
||||||
<name>V1</name>
|
<name>V1</name>
|
||||||
<mode>once</mode>
|
<mode>once</mode>
|
||||||
|
|
BIN
Sounds/tripleBelt.wav
Normal file
BIN
Sounds/tripleBelt.wav
Normal file
Binary file not shown.
Reference in a new issue