diff --git a/A320-main.xml b/A320-main.xml
index 43268116..e42878f9 100644
--- a/A320-main.xml
+++ b/A320-main.xml
@@ -589,6 +589,7 @@
0
0
0
+ 0
diff --git a/Models/Instruments/OHpanel/OHpanel.xml b/Models/Instruments/OHpanel/OHpanel.xml
index 58c24566..d794ed11 100644
--- a/Models/Instruments/OHpanel/OHpanel.xml
+++ b/Models/Instruments/OHpanel/OHpanel.xml
@@ -6009,5 +6009,211 @@
-
+
+
+ pick
+ LeftRainTest
+
+
+ false
+
+ property-toggle
+ /controls/switches/LrainRpt
+
+
+ nasal
+
+
+
+
+
+
+ pick
+ RightRainTest
+
+
+ false
+
+ property-toggle
+ /controls/switches/RrainRpt
+
+
+ nasal
+
+
+
+
+
+
+ rotate
+ LeftWiperKnb
+ /controls/switches/wiperLspd
+
+ -1-50
+ 00
+ 150
+ 2100
+
+
+ 0.00608
+ -0.21485
+ -0.26721
+ 0.00095
+ -0.21591
+ -0.26721
+
+
+
+
+ pick
+ LeftWiperKnb
+
+
+ false
+
+ property-cycle
+ /controls/switches/wiperLspd
+ -1
+ 0
+ 1
+ 2
+
+
+
+
+
+ rotate
+ RightWiperKnb
+ /controls/switches/wiperLspd
+
+ -1-50
+ 00
+ 150
+ 2100
+
+
+ 0.00608
+ -0.21485
+ -0.26721
+ 0.00095
+ -0.21591
+ -0.26721
+
+
+
+
+ pick
+ RightWiperKnb
+
+
+ false
+
+ property-cycle
+ /controls/switches/wiperRspd
+ -1
+ 0
+ 1
+ 2
+
+
+
+
+
+ select
+ PassOxyInd1S
+
+
+ /controls/oxygen/masksSys
+ 1
+
+
+
+
+
+ pick
+ PassOxyInd1S
+
+
+ false
+
+ property-toggle
+ /controls/oxygen/masksSys
+
+
+ nasal
+
+
+
+
+
+
+ select
+ CrewOxyBtn2O
+
+
+ /controls/oxygen/crewOxyPB
+ 1
+
+
+
+
+
+ pick
+ CrewOxyBtn2O
+
+
+ false
+
+ property-toggle
+ /controls/oxygen/crewOxyPB
+
+
+ nasal
+
+
+
+
+
+
+ rotate
+ MaskManOnGaurd
+ /controls/OH/protectors/maskman
+
+ 00
+ 190
+
+
+ 0.00375
+ -0.27338
+ -0.15783
+ 0.00228
+ -0.26147
+ -0.15783
+
+
+
+
+ pick
+ MaskManOnGaurd
+
+
+
+ property-assign
+ controls/OH/protectors/maskman
+ 1
+
+
+
+ property-assign
+ controls/OH/protectors/maskman
+ 0
+
+
+ nasal
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Nasal/buttons.nas b/Nasal/buttons.nas
index eff17b67..ac4a6082 100644
--- a/Nasal/buttons.nas
+++ b/Nasal/buttons.nas
@@ -26,16 +26,78 @@ var variousReset = func {
setprop("/controls/CVR/gndctl", 0);
setprop("/controls/CVR/erase", 0);
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/switches/wiperLspd", 0); # -1 = INTM 0 = OFF 1 = LO 2 = HI
+ setprop("/controls/switches/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 {
- setprop("/controls/switches/cabinCall", 1);
+ setprop("/controls/switches/emerCall", 0);
settimer(func() {
- setprop("/controls/switches/cabinCall", 0);
+ setprop("/controls/switches/emerCall", 0);
}, 15);
}
-
+
var MechCall = func {
setprop("/controls/switches/mechCall", 1);
settimer(func() {
@@ -171,3 +233,6 @@ var update_CVR = func {
}
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);
\ No newline at end of file
diff --git a/Nasal/pneumatics.nas b/Nasal/pneumatics.nas
index 53764cce..5f706659 100644
--- a/Nasal/pneumatics.nas
+++ b/Nasal/pneumatics.nas
@@ -72,6 +72,9 @@ setlistener("/sim/signals/fdm-initialized", func {
var eng1on = getprop("/controls/deice/eng1-on");
var eng2on = getprop("/controls/deice/eng2-on");
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 {
@@ -133,6 +136,10 @@ var pneu_init = func {
setprop("/systems/ventilation/lavatory/extractvalve", "0");
setprop("/controls/deice/eng1-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();
}
@@ -387,8 +394,28 @@ var flashfault2 = func {
settimer(func {
setprop("/controls/deice/eng2-fault", 0);
}, 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 #
###################
diff --git a/Sounds/A320-common-sound.xml b/Sounds/A320-common-sound.xml
index 831fa232..678a500e 100644
--- a/Sounds/A320-common-sound.xml
+++ b/Sounds/A320-common-sound.xml
@@ -78,6 +78,23 @@
100.0
+
+ EmerCall
+ once
+ tripleBelt.wav
+
+
+ /controls/switches/emerCall
+ 1
+
+
+
+ 8
+
+ 20.0
+ 100.0
+
+
V1
once
diff --git a/Sounds/tripleBelt.wav b/Sounds/tripleBelt.wav
new file mode 100644
index 00000000..8d468f52
Binary files /dev/null and b/Sounds/tripleBelt.wav differ