1
0
Fork 0

FCU: fix bindings. Not all FBW failures inhibit the autoflight system.

This commit is contained in:
legoboyvdlp R 2020-11-28 17:33:44 +00:00
parent 3eec965bc3
commit b16aac146e
2 changed files with 12 additions and 12 deletions

View file

@ -58,7 +58,7 @@ var FCU = {
var FCUController = {
FCU1: nil,
FCU2: nil,
activeFMGC: props.globals.getNode("FMGC/active-fmgc-channel"),
activeFMGC: props.globals.getNode("/FMGC/active-fmgc-channel"),
FCUworking: 0,
_init: 0,
init: func() {
@ -81,9 +81,8 @@ var FCUController = {
FCUworkingNode.setValue(0);
}
notification = nil;
foreach (var update_item; me.update_items) {
update_item.update(notification);
update_item.update(nil);
}
},
update_items: [
@ -99,8 +98,8 @@ var FCUController = {
me.FCU2.restore();
},
AP1: func() {
if (me.FCUworking and fbw.FBW.activeLaw.getValue() == 0) {
if (!ap1.getBoolValue()) {
if (me.FCUworking) {
if (!ap1.getBoolValue() and fbw.FBW.apOff == 0) {
ap1Input.setValue(1);
ecam.apWarnNode.setValue(0);
pts.Controls.Flight.rudderTrim.setValue(0);
@ -110,9 +109,10 @@ var FCUController = {
}
},
AP2: func() {
if (me.FCUworking and fbw.FBW.activeLaw.getValue() == 0) {
if (!ap2.getBoolValue()) {
if (me.FCUworking) {
if (!ap2.getBoolValue() and fbw.FBW.apOff == 0) {
ap2Input.setValue(1);
ecam.apWarnNode.setValue(0);
pts.Controls.Flight.rudderTrim.setValue(0);
} else {
apOff("hard", 2);
@ -120,8 +120,8 @@ var FCUController = {
}
},
ATHR: func() {
if (me.FCUworking and !pts.FMGC.CasCompare.casRejectAll.getBoolValue() and fbw.FBW.activeLaw.getValue() == 0) {
if (!athr.getBoolValue()) {
if (me.FCUworking) {
if (!athr.getBoolValue() and !pts.FMGC.CasCompare.casRejectAll.getBoolValue() and fbw.FBW.apOff == 0) {
athrInput.setValue(1);
} else {
athrOff("hard");

View file

@ -441,7 +441,7 @@ var ITAF = {
},
ap1Master: func(s) {
if (s == 1) {
if (Output.vert.getValue() != 6 and !Gear.wow1.getBoolValue() and !Gear.wow2.getBoolValue() and systems.ELEC.Bus.acEss.getValue() >= 110 and Misc.fbwLaw.getValue() == 0 and Position.gearAglFt.getValue() >= 100) {
if (Output.vert.getValue() != 6 and !Gear.wow1.getBoolValue() and !Gear.wow2.getBoolValue() and systems.ELEC.Bus.acEss.getValue() >= 110 and fbw.FBW.apOff == 0 and Position.gearAglFt.getValue() >= 100) {
me.revertBasicMode();
Output.ap1.setBoolValue(1);
Output.latTemp = Output.lat.getValue();
@ -462,7 +462,7 @@ var ITAF = {
},
ap2Master: func(s) {
if (s == 1) {
if (Output.vert.getValue() != 6 and !Gear.wow1.getBoolValue() and !Gear.wow2.getBoolValue() and systems.ELEC.Bus.acEss.getValue() >= 110 and Misc.fbwLaw.getValue() == 0 and Position.gearAglFt.getValue() >= 100) {
if (Output.vert.getValue() != 6 and !Gear.wow1.getBoolValue() and !Gear.wow2.getBoolValue() and systems.ELEC.Bus.acEss.getValue() >= 110 and fbw.FBW.apOff == 0 and Position.gearAglFt.getValue() >= 100) {
me.revertBasicMode();
Output.ap2.setBoolValue(1);
Output.latTemp = Output.lat.getValue();
@ -492,7 +492,7 @@ var ITAF = {
},
athrMaster: func(s) {
if (s == 1) {
if (systems.ELEC.Bus.acEss.getValue() >= 110) {
if (systems.ELEC.Bus.acEss.getValue() >= 110 and !pts.FMGC.CasCompare.casRejectAll.getBoolValue() and fbw.FBW.apOff == 0) {
Output.athr.setBoolValue(1);
Custom.ThrLock.setValue(0);
Custom.Sound.enableAthrOff = 1;