1
0
Fork 0

System: Complete ignition rework part 2

This commit is contained in:
Josh Davidson 2022-03-09 12:25:55 -05:00
parent 004ebd8239
commit 8d05ba4184
4 changed files with 17 additions and 21 deletions

View file

@ -733,7 +733,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(excessCabAltSPD);
}
if (excessCabAltENG.clearFlag == 0 and pts.Controls.Engines.startSw.getValue() != 1) {
if (excessCabAltENG.clearFlag == 0 and systems.IGNITION.startSw.getValue() != 1) {
excessCabAltENG.active = 1;
} else {
ECAM_controller.warningReset(excessCabAltENG);
@ -1148,7 +1148,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(emerconfigManOn);
}
if (pts.Controls.Engines.startSw.getValue() != 2 and emerconfigEngMode.clearFlag == 0) {
if (systems.IGNITION.startSw.getValue() != 2 and emerconfigEngMode.clearFlag == 0) {
emerconfigEngMode.active = 1;
} else {
ECAM_controller.warningReset(emerconfigEngMode);
@ -1476,7 +1476,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(shaftFailure1);
}
if (phaseVar2 != 2 and phaseVar2 != 9 and pts.Controls.Engines.startSw.getValue() != 2 and eng1FailModeSel.clearFlag == 0) { # and not stall and not EGT protect
if (phaseVar2 != 2 and phaseVar2 != 9 and systems.IGNITION.startSw.getValue() != 2 and eng1FailModeSel.clearFlag == 0) { # and not stall and not EGT protect
eng1FailModeSel.active = 1;
} else {
ECAM_controller.warningReset(eng1FailModeSel);
@ -1584,7 +1584,7 @@ var messages_priority_2 = func {
}
if (FWC.Timer.gnd.getValue() == 0 or systems.fireButtons[0].getValue() == 0) {
if (eng1ShutDownModeSel.clearFlag == 0 and pts.Controls.Engines.startSw.getValue() != 2) {
if (eng1ShutDownModeSel.clearFlag == 0 and systems.IGNITION.startSw.getValue() != 2) {
eng1ShutDownModeSel.active = 1;
} else {
ECAM_controller.warningReset(eng1ShutDownModeSel);
@ -1683,7 +1683,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(shaftFailure2);
}
if (phaseVar2 != 2 and phaseVar2 != 9 and pts.Controls.Engines.startSw.getValue() != 2 and eng2FailModeSel.clearFlag == 0) { # and not stall and not EGT protect
if (phaseVar2 != 2 and phaseVar2 != 9 and systems.IGNITION.startSw.getValue() != 2 and eng2FailModeSel.clearFlag == 0) { # and not stall and not EGT protect
eng2FailModeSel.active = 1;
} else {
ECAM_controller.warningReset(eng2FailModeSel);
@ -1797,7 +1797,7 @@ var messages_priority_2 = func {
}
if (FWC.Timer.gnd.getValue() == 0 or systems.fireButtons[1].getValue() == 0) {
if (eng2ShutDownModeSel.clearFlag == 0 and pts.Controls.Engines.startSw.getValue() != 2) {
if (eng2ShutDownModeSel.clearFlag == 0 and systems.IGNITION.startSw.getValue() != 2) {
eng2ShutDownModeSel.active = 1;
} else {
ECAM_controller.warningReset(eng2ShutDownModeSel);
@ -3975,7 +3975,7 @@ var messages_right_memo = func {
pax_oxy.active = 0;
}
if (getprop("/controls/engines/engine[0]/igniter-a") == 1 or getprop("/controls/engines/engine[0]/igniter-b") == 1 or getprop("/controls/engines/engine[1]/igniter-a") == 1 or getprop("/controls/engines/engine[1]/igniter-b") == 1) {
if (getprop("/systems/ignition/ign-1/igniter-a") == 1 or getprop("/systems/ignition/ign-1/igniter-b") == 1 or getprop("/systems/ignition/ign-2/igniter-a") == 1 or getprop("/systems/ignition/ign-2/igniter-b") == 1) {
ignition.active = 1;
} else {
ignition.active = 0;

View file

@ -218,7 +218,7 @@ var SystemDisplayController = {
}
}
me.tempEngineModeSel = pts.Controls.Engines.startSw.getValue();
me.tempEngineModeSel = systems.IGNITION.startSw.getValue();
if (me.tempEngineModeSel == 0 or me.tempEngineModeSel == 2) {
if (!me.Display.Engine) {
me.Display.Engine = 1;

View file

@ -131,8 +131,8 @@ var systemsInit = func() {
systems.HYD.init();
systems.FUEL.init();
systems.ADIRS.init();
systems.eng_init();
systems.ENGINE.init();
systems.IGNITION.init();
systems.FADEC.init();
systems.APUController.init();
systems.BrakeSys.reset();
@ -201,14 +201,6 @@ var systemsLoop = func(notification) {
systems.PNEU.Switch.groundAir.setBoolValue(0);
}
}
if (notification.engine1State >= 2 and pts.Fdm.JSBsim.Propulsion.Tank.contentsLbs[5].getValue() < 1) {
systems.cutoff_one();
}
if (notification.engine2State >= 2 and pts.Fdm.JSBsim.Propulsion.Tank.contentsLbs[6].getValue() < 1) {
systems.cutoff_two();
}
}
# GPWS

View file

@ -31,7 +31,6 @@ var Consumables = {
var Controls = {
Engines: {
startSw: props.globals.getNode("/controls/engines/engine-start-switch"),
Engine: {
cutoff: [props.globals.getNode("/controls/engines/engine[0]/cutoff"), props.globals.getNode("/controls/engines/engine[1]/cutoff")],
cutoffSw: [props.globals.getNode("/controls/engines/engine[0]/cutoff-switch"), props.globals.getNode("/controls/engines/engine[1]/cutoff-switch")],
@ -138,14 +137,14 @@ var Fdm = {
wow: props.globals.getNode("/fdm/jsbsim/position/wow"),
},
Propulsion: {
tatC: props.globals.getNode("/fdm/jsbsim/propulsion/tat-c"),
Engine: {
fuelUsed: [props.globals.getNode("/fdm/jsbsim/propulsion/engine[0]/fuel-used-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/engine[1]/fuel-used-lbs")],
reverserAngle: [props.globals.getNode("/fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad"), props.globals.getNode("/fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad")],
},
setRunning: props.globals.getNode("/fdm/jsbsim/propulsion/set-running"),
tatC: props.globals.getNode("/fdm/jsbsim/propulsion/tat-c"),
Tank: {
contentsLbs: [props.globals.getNode("/fdm/jsbsim/propulsion/tank[0]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[1]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[2]/contents-lbs"),
props.globals.getNode("/fdm/jsbsim/propulsion/tank[3]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[4]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[5]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[6]/contents-lbs")],
contentsLbs: [props.globals.getNode("/fdm/jsbsim/propulsion/tank[0]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[1]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[2]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[3]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[4]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[5]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[6]/contents-lbs")],
},
},
},
@ -358,6 +357,11 @@ var Sim = {
};
var Systems = {
Acconfig: {
Options: {
igniterSelect: [props.globals.getNode("/systems/acconfig/options/igniter-select-1"), props.globals.getNode("/systems/acconfig/options/igniter-select-2")],
}
},
Navigation: {
ADR: {
Output: {