icing update

This commit is contained in:
Jonathan Redpath 2017-08-07 20:24:32 +01:00
parent 8c9bc9c80a
commit bf29c6ec26
3 changed files with 20 additions and 8 deletions

View file

@ -153,8 +153,6 @@ var perfTOInput = func(key) {
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED"); setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
} }
} }
} else if (key == "R6") {
setprop("/MCDU[0]/page", "CLB");
} else if (key == "R3") { } else if (key == "R3") {
if (scratchpad == "CLR") { if (scratchpad == "CLR") {
setprop("/FMGC/internal/to-flap", 0); setprop("/FMGC/internal/to-flap", 0);
@ -236,5 +234,7 @@ var perfTOInput = func(key) {
setprop("/MCDU[0]/scratchpad", "NOT ALLOWED"); setprop("/MCDU[0]/scratchpad", "NOT ALLOWED");
} }
} }
} } else if (key == "R6") {
setprop("/MCDU[0]/page", "CLB");
}
} }

View file

@ -153,8 +153,6 @@ var perfTOInput = func(key) {
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED"); setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
} }
} }
} else if (key == "R6") {
setprop("/MCDU[1]/page", "CLB");
} else if (key == "R3") { } else if (key == "R3") {
if (scratchpad == "CLR") { if (scratchpad == "CLR") {
setprop("/FMGC/internal/to-flap", 0); setprop("/FMGC/internal/to-flap", 0);
@ -236,5 +234,7 @@ var perfTOInput = func(key) {
setprop("/MCDU[1]/scratchpad", "NOT ALLOWED"); setprop("/MCDU[1]/scratchpad", "NOT ALLOWED");
} }
} }
} } else if (key == "R6") {
setprop("/MCDU[1]/page", "CLB");
}
} }

View file

@ -268,7 +268,7 @@ var icingModel = func {
################# #################
setlistener("/controls/switches/leng", func { setlistener("/controls/switches/leng", func {
if (lengBtn) { if (lengBtn and stateL == 3) {
setprop("/controls/switches/lengfault", 1); setprop("/controls/switches/lengfault", 1);
settimer(func() { settimer(func() {
setprop("/controls/switches/lengfault", 0); setprop("/controls/switches/lengfault", 0);
@ -283,12 +283,18 @@ var icingModel = func {
} }
}); });
setlistener("/engines/engine[0]/state", func {
if (stateL != 3) {
setprop("/controls/switches/leng", 0);
}
});
################# #################
# REng Anti-Ice # # REng Anti-Ice #
################# #################
setlistener("/controls/switches/reng", func { setlistener("/controls/switches/reng", func {
if (rengBtn) { if (rengBtn and stateR == 3) {
setprop("/controls/switches/rengfault", 1); setprop("/controls/switches/rengfault", 1);
settimer(func() { settimer(func() {
setprop("/controls/switches/rengfault", 0); setprop("/controls/switches/rengfault", 0);
@ -303,6 +309,12 @@ var icingModel = func {
} }
}); });
setlistener("/engines/engine[1]/state", func {
if (stateR != 3) {
setprop("/controls/switches/reng", 0);
}
});
################## ##################
# Probe Anti-Ice # # Probe Anti-Ice #
################## ##################