Major improvements to right memos, ready for first merge
This commit is contained in:
parent
c84cd2780b
commit
a766213546
5 changed files with 47 additions and 13 deletions
|
@ -130,7 +130,7 @@ var memos = std.Vector.new([
|
||||||
var rat = memo.new(msg: "RAT OUT", active: 0, colour: "g"),
|
var rat = memo.new(msg: "RAT OUT", active: 0, colour: "g"),
|
||||||
var emer_gen = memo.new(msg: "EMER GEN", active: 0, colour: "g"),
|
var emer_gen = memo.new(msg: "EMER GEN", active: 0, colour: "g"),
|
||||||
var ram_air = memo.new(msg: "RAM AIR ON", active: 0, colour: "g"),
|
var ram_air = memo.new(msg: "RAM AIR ON", active: 0, colour: "g"),
|
||||||
var nw_strg_disc = memo.new(msg: "NW STRG DISC", active: 0, colour: "g"), # Not yet implemented
|
var nw_strg_disc = memo.new(msg: "NW STRG DISC", active: 0, colour: "g"),
|
||||||
var ignition = memo.new(msg: "IGNITION", active: 0, colour: "g"),
|
var ignition = memo.new(msg: "IGNITION", active: 0, colour: "g"),
|
||||||
var cabin_ready = memo.new(msg: "CABIN READY", active: 0, colour: "g"), # Not yet implemented
|
var cabin_ready = memo.new(msg: "CABIN READY", active: 0, colour: "g"), # Not yet implemented
|
||||||
var pred_ws_off = memo.new(msg: "PRED W/S OFF", active: 0, colour: "g"), # Not yet implemented
|
var pred_ws_off = memo.new(msg: "PRED W/S OFF", active: 0, colour: "g"), # Not yet implemented
|
||||||
|
@ -151,7 +151,7 @@ var memos = std.Vector.new([
|
||||||
var brk_fan = memo.new(msg: "BRK FAN", active: 0, colour: "g"), # Not yet implemented
|
var brk_fan = memo.new(msg: "BRK FAN", active: 0, colour: "g"), # Not yet implemented
|
||||||
var audio3_xfrd = memo.new(msg: "AUDIO 3 XFRD", active: 0, colour: "g"), # Not yet implemented
|
var audio3_xfrd = memo.new(msg: "AUDIO 3 XFRD", active: 0, colour: "g"), # Not yet implemented
|
||||||
var switchg_pnl = memo.new(msg: "SWITCHG PNL", active: 0, colour: "g"), # Not yet implemented
|
var switchg_pnl = memo.new(msg: "SWITCHG PNL", active: 0, colour: "g"), # Not yet implemented
|
||||||
var gpws_flap3 = memo.new(msg: "GPWS FLAP 3", active: 0, colour: "g"), # Not yet implemented
|
var gpws_flap3 = memo.new(msg: "GPWS FLAP 3", active: 0, colour: "g"),
|
||||||
var hf_data_ovrd = memo.new(msg: "HF DATA OVRD", active: 0, colour: "g"), # Not yet implemented
|
var hf_data_ovrd = memo.new(msg: "HF DATA OVRD", active: 0, colour: "g"), # Not yet implemented
|
||||||
var hf_voice = memo.new(msg: "HF VOICE", active: 0, colour: "g"), # Not yet implemented
|
var hf_voice = memo.new(msg: "HF VOICE", active: 0, colour: "g"), # Not yet implemented
|
||||||
var acars_stby = memo.new(msg: "ACARS STBY", active: 0, colour: "g"), # Not yet implemented
|
var acars_stby = memo.new(msg: "ACARS STBY", active: 0, colour: "g"), # Not yet implemented
|
||||||
|
@ -161,7 +161,7 @@ var memos = std.Vector.new([
|
||||||
var auto_brk_max = memo.new(msg: "AUTO BRK MAX", active: 0, colour: "g"),
|
var auto_brk_max = memo.new(msg: "AUTO BRK MAX", active: 0, colour: "g"),
|
||||||
var auto_brk_off = memo.new(msg: "AUTO BRK OFF", active: 0, colour: "g"), # Not yet implemented
|
var auto_brk_off = memo.new(msg: "AUTO BRK OFF", active: 0, colour: "g"), # Not yet implemented
|
||||||
var man_ldg_elev = memo.new(msg: "MAN LDG ELEV", active: 0, colour: "g"), # Not yet implemented
|
var man_ldg_elev = memo.new(msg: "MAN LDG ELEV", active: 0, colour: "g"), # Not yet implemented
|
||||||
var ctr_tk_feedg = memo.new(msg: "CTR TK FEEDG", active: 0, colour: "g"), # Not yet implemented
|
var ctr_tk_feedg = memo.new(msg: "CTR TK FEEDG", active: 0, colour: "g"),
|
||||||
var fuelx = memo.new(msg: "FUEL X FEED", active: 0, colour: "g")
|
var fuelx = memo.new(msg: "FUEL X FEED", active: 0, colour: "g")
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
|
@ -143,6 +143,7 @@ var messages_right_memo = func {
|
||||||
} else {
|
} else {
|
||||||
athr_off.active = 0;
|
athr_off.active = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((getprop("/ECAM/warning-phase") >= 2 and getprop("/ECAM/warning-phase") <= 7) and getprop("controls/flight/speedbrake") != 0) {
|
if ((getprop("/ECAM/warning-phase") >= 2 and getprop("/ECAM/warning-phase") <= 7) and getprop("controls/flight/speedbrake") != 0) {
|
||||||
spd_brk.active = 1;
|
spd_brk.active = 1;
|
||||||
} else {
|
} else {
|
||||||
|
@ -184,6 +185,18 @@ var messages_right_memo = func {
|
||||||
rat.colour = "g";
|
rat.colour = "g";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (getprop("/sim/model/pushback/enabled") == 1) {
|
||||||
|
nw_strg_disc.active = 1;
|
||||||
|
} else {
|
||||||
|
nw_strg_disc.active = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getprop("/engines/engine[0]/state") == 3 or getprop("/engines/engine[1]/state") == 3) {
|
||||||
|
nw_strg_disc.colour = "a";
|
||||||
|
} else {
|
||||||
|
nw_strg_disc.colour = "g";
|
||||||
|
}
|
||||||
|
|
||||||
if (getprop("/controls/electrical/switches/emer-gen") == 1 and getprop("/controls/hydraulic/rat-deployed") == 1 and !wow) {
|
if (getprop("/controls/electrical/switches/emer-gen") == 1 and getprop("/controls/hydraulic/rat-deployed") == 1 and !wow) {
|
||||||
emer_gen.active = 1;
|
emer_gen.active = 1;
|
||||||
} else {
|
} else {
|
||||||
|
@ -202,6 +215,12 @@ var messages_right_memo = func {
|
||||||
ignition.active = 0;
|
ignition.active = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (getprop("/controls/pneumatic/switches/bleedapu") == 1 and getprop("/systems/apu/rpm") >= 95) {
|
||||||
|
apu_bleed.active = 1;
|
||||||
|
} else {
|
||||||
|
apu_bleed.active = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (apu_bleed.active == 0 and getprop("/systems/apu/rpm") >= 95) {
|
if (apu_bleed.active == 0 and getprop("/systems/apu/rpm") >= 95) {
|
||||||
apu_avail.active = 1;
|
apu_avail.active = 1;
|
||||||
} else {
|
} else {
|
||||||
|
@ -225,6 +244,7 @@ var messages_right_memo = func {
|
||||||
} else {
|
} else {
|
||||||
wing_aice.active = 0;
|
wing_aice.active = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getprop("/instrumentation/comm[2]/frequencies/selected-mhz") != 0 and (getprop("/ECAM/warning-phase") == 1 or getprop("/ECAM/warning-phase") == 2 or getprop("/ECAM/warning-phase") == 6 or getprop("/ECAM/warning-phase") == 9 or getprop("/ECAM/warning-phase") == 10)) {
|
if (getprop("/instrumentation/comm[2]/frequencies/selected-mhz") != 0 and (getprop("/ECAM/warning-phase") == 1 or getprop("/ECAM/warning-phase") == 2 or getprop("/ECAM/warning-phase") == 6 or getprop("/ECAM/warning-phase") == 9 or getprop("/ECAM/warning-phase") == 10)) {
|
||||||
vhf3_voice.active = 1;
|
vhf3_voice.active = 1;
|
||||||
} else {
|
} else {
|
||||||
|
@ -259,4 +279,16 @@ var messages_right_memo = func {
|
||||||
} else {
|
} else {
|
||||||
fuelx.colour = "g";
|
fuelx.colour = "g";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (getprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override") == 1) { # todo: emer elec
|
||||||
|
gpws_flap3.active = 1;
|
||||||
|
} else {
|
||||||
|
gpws_flap3.active = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getprop("/ECAM/warning-phase") >= 2 and getprop("/ECAM/warning-phase") <= 9 and getprop("/systems/fuel/only-use-ctr-tank") == 1 and getprop("/systems/electrical/bus/ac1") >= 115 and getprop("/systems/electrical/bus/ac2") >= 115) {
|
||||||
|
ctr_tk_feedg.active = 1;
|
||||||
|
} else {
|
||||||
|
ctr_tk_feedg.active = 0;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -195,15 +195,15 @@ var ECAM = {
|
||||||
}
|
}
|
||||||
|
|
||||||
# AP / ATHR warnings
|
# AP / ATHR warnings
|
||||||
if (ap1_active == 1 and (getprop("/ECAM/ap1-off-time") + 9 < getprop("/sim/time/elapsed-sec"))) {
|
if (ap1_active == 1 and getprop("/it-autoflight/input/ap1") == 0 and (getprop("/ECAM/ap1-off-time") + 9 < getprop("/sim/time/elapsed-sec"))) {
|
||||||
ap1_active = 0;
|
ap1_active = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ap2_active == 1 and (getprop("/ECAM/ap2-off-time") + 9 < getprop("/sim/time/elapsed-sec"))) {
|
if (ap2_active == 1 and getprop("/it-autoflight/input/ap2") == 0 and (getprop("/ECAM/ap2-off-time") + 9 < getprop("/sim/time/elapsed-sec"))) {
|
||||||
ap2_active = 0;
|
ap2_active = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (athr_active == 1 and (getprop("/ECAM/athr-off-time") + 9 < getprop("/sim/time/elapsed-sec"))) {
|
if (athr_active == 1 and getprop("/it-autoflight/input/athr") == 0 and (getprop("/ECAM/athr-off-time") + 9 < getprop("/sim/time/elapsed-sec"))) {
|
||||||
athr_active = 0;
|
athr_active = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -452,7 +452,9 @@ setlistener("/it-autoflight/input/ap2", func {
|
||||||
|
|
||||||
setlistener("/it-autoflight/input/athr", func {
|
setlistener("/it-autoflight/input/athr", func {
|
||||||
if (getprop("/it-autoflight/input/athr") == 0) {
|
if (getprop("/it-autoflight/input/athr") == 0) {
|
||||||
athr_active = 1;
|
if (getprop("/position/gear-agl-ft") > 50) {
|
||||||
setprop("/ECAM/athr-off-time", getprop("/sim/time/elapsed-sec"));
|
athr_active = 1;
|
||||||
|
setprop("/ECAM/athr-off-time", getprop("/sim/time/elapsed-sec"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, 0, 0);
|
}, 0, 0);
|
|
@ -170,7 +170,7 @@ setlistener("/it-autoflight/input/athr", func {
|
||||||
var atmas = getprop("/it-autoflight/input/athr");
|
var atmas = getprop("/it-autoflight/input/athr");
|
||||||
if (atmas == 0) {
|
if (atmas == 0) {
|
||||||
setprop("/it-autoflight/output/athr", 0);
|
setprop("/it-autoflight/output/athr", 0);
|
||||||
if (getprop("/it-autoflight/sound/enableathrsound") == 1 and getprop("/it-autoflight/output/athr") == 0) {
|
if (getprop("/it-autoflight/sound/enableathrsound") == 1 and getprop("/it-autoflight/output/athr") == 0 and getprop("/position/gear-agl-ft") > 50) {
|
||||||
setprop("/it-autoflight/sound/athrsound", 1);
|
setprop("/it-autoflight/sound/athrsound", 1);
|
||||||
setprop("/it-autoflight/sound/enableathrsound", 0);
|
setprop("/it-autoflight/sound/enableathrsound", 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -235,10 +235,10 @@ var icingModel = func {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((getprop("/systems/electrical/bus/dc1") == 0 or getprop("/systems/electrical/bus/dc2") == 0) and getprop("/fdm/jsbsim/position/wow") == 0) {
|
# if ((getprop("/systems/electrical/bus/dc1") == 0 or getprop("/systems/electrical/bus/dc2") == 0) and getprop("/fdm/jsbsim/position/wow") == 0) {
|
||||||
setprop("/controls/switches/leng", 1);
|
# setprop("/controls/switches/leng", 1);
|
||||||
setprop("/controls/switches/reng", 1);
|
# setprop("/controls/switches/reng", 1);
|
||||||
}
|
# }
|
||||||
|
|
||||||
if (getprop("/systems/electrical/bus/dc-ess-shed") == 0) {
|
if (getprop("/systems/electrical/bus/dc-ess-shed") == 0) {
|
||||||
setprop("/controls/switches/wing", 0);
|
setprop("/controls/switches/wing", 0);
|
||||||
|
|
Reference in a new issue