FCU: fix bindings. Not all FBW failures inhibit the autoflight system.
This commit is contained in:
parent
3eec965bc3
commit
b16aac146e
2 changed files with 12 additions and 12 deletions
|
@ -58,7 +58,7 @@ var FCU = {
|
||||||
var FCUController = {
|
var FCUController = {
|
||||||
FCU1: nil,
|
FCU1: nil,
|
||||||
FCU2: nil,
|
FCU2: nil,
|
||||||
activeFMGC: props.globals.getNode("FMGC/active-fmgc-channel"),
|
activeFMGC: props.globals.getNode("/FMGC/active-fmgc-channel"),
|
||||||
FCUworking: 0,
|
FCUworking: 0,
|
||||||
_init: 0,
|
_init: 0,
|
||||||
init: func() {
|
init: func() {
|
||||||
|
@ -81,9 +81,8 @@ var FCUController = {
|
||||||
FCUworkingNode.setValue(0);
|
FCUworkingNode.setValue(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
notification = nil;
|
|
||||||
foreach (var update_item; me.update_items) {
|
foreach (var update_item; me.update_items) {
|
||||||
update_item.update(notification);
|
update_item.update(nil);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
update_items: [
|
update_items: [
|
||||||
|
@ -99,8 +98,8 @@ var FCUController = {
|
||||||
me.FCU2.restore();
|
me.FCU2.restore();
|
||||||
},
|
},
|
||||||
AP1: func() {
|
AP1: func() {
|
||||||
if (me.FCUworking and fbw.FBW.activeLaw.getValue() == 0) {
|
if (me.FCUworking) {
|
||||||
if (!ap1.getBoolValue()) {
|
if (!ap1.getBoolValue() and fbw.FBW.apOff == 0) {
|
||||||
ap1Input.setValue(1);
|
ap1Input.setValue(1);
|
||||||
ecam.apWarnNode.setValue(0);
|
ecam.apWarnNode.setValue(0);
|
||||||
pts.Controls.Flight.rudderTrim.setValue(0);
|
pts.Controls.Flight.rudderTrim.setValue(0);
|
||||||
|
@ -110,9 +109,10 @@ var FCUController = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
AP2: func() {
|
AP2: func() {
|
||||||
if (me.FCUworking and fbw.FBW.activeLaw.getValue() == 0) {
|
if (me.FCUworking) {
|
||||||
if (!ap2.getBoolValue()) {
|
if (!ap2.getBoolValue() and fbw.FBW.apOff == 0) {
|
||||||
ap2Input.setValue(1);
|
ap2Input.setValue(1);
|
||||||
|
ecam.apWarnNode.setValue(0);
|
||||||
pts.Controls.Flight.rudderTrim.setValue(0);
|
pts.Controls.Flight.rudderTrim.setValue(0);
|
||||||
} else {
|
} else {
|
||||||
apOff("hard", 2);
|
apOff("hard", 2);
|
||||||
|
@ -120,8 +120,8 @@ var FCUController = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ATHR: func() {
|
ATHR: func() {
|
||||||
if (me.FCUworking and !pts.FMGC.CasCompare.casRejectAll.getBoolValue() and fbw.FBW.activeLaw.getValue() == 0) {
|
if (me.FCUworking) {
|
||||||
if (!athr.getBoolValue()) {
|
if (!athr.getBoolValue() and !pts.FMGC.CasCompare.casRejectAll.getBoolValue() and fbw.FBW.apOff == 0) {
|
||||||
athrInput.setValue(1);
|
athrInput.setValue(1);
|
||||||
} else {
|
} else {
|
||||||
athrOff("hard");
|
athrOff("hard");
|
||||||
|
|
|
@ -441,7 +441,7 @@ var ITAF = {
|
||||||
},
|
},
|
||||||
ap1Master: func(s) {
|
ap1Master: func(s) {
|
||||||
if (s == 1) {
|
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();
|
me.revertBasicMode();
|
||||||
Output.ap1.setBoolValue(1);
|
Output.ap1.setBoolValue(1);
|
||||||
Output.latTemp = Output.lat.getValue();
|
Output.latTemp = Output.lat.getValue();
|
||||||
|
@ -462,7 +462,7 @@ var ITAF = {
|
||||||
},
|
},
|
||||||
ap2Master: func(s) {
|
ap2Master: func(s) {
|
||||||
if (s == 1) {
|
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();
|
me.revertBasicMode();
|
||||||
Output.ap2.setBoolValue(1);
|
Output.ap2.setBoolValue(1);
|
||||||
Output.latTemp = Output.lat.getValue();
|
Output.latTemp = Output.lat.getValue();
|
||||||
|
@ -492,7 +492,7 @@ var ITAF = {
|
||||||
},
|
},
|
||||||
athrMaster: func(s) {
|
athrMaster: func(s) {
|
||||||
if (s == 1) {
|
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);
|
Output.athr.setBoolValue(1);
|
||||||
Custom.ThrLock.setValue(0);
|
Custom.ThrLock.setValue(0);
|
||||||
Custom.Sound.enableAthrOff = 1;
|
Custom.Sound.enableAthrOff = 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue