Skip to content

Commit 1ca5178

Browse files
authored
feat(a32nx/fws): (Re-)add THR LEVERS NOT SET master caution (#10644)
* feat(a32nx/fws): (Re-)add THR LEVERS NOT SET master caution * Changelog and docs * Update convenience vars * Refactor * Small refactor
1 parent 87cf97e commit 1ca5178

6 files changed

Lines changed: 159 additions & 59 deletions

File tree

.github/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
1. [A380X/MFD] Added IMMEDIATE EXIT/RESUME HOLD button to the F-PLN page - @BravoMike99 (bruno_pt99)
119119
1. [A32NX/FWS] Add message grouping and order messages based on priority - @FozzieHi (fozzie)
120120
1. [FMS] Add lateral discontinuity ahead fms message - @BravoMike99 (bruno_pt99)
121+
1. [A32NX/FWS] Add `THR LEVERS NOT SET` master caution - @FozzieHi (fozzie)
121122

122123
## 0.14.0
123124

fbw-a32nx/docs/a320-simvars.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2280,6 +2280,16 @@ In the variables below, {number} should be replaced with one item in the set: {
22802280
- Boolean
22812281
- State of igniter B on engine {index}
22822282

2283+
- A32NX_ECU_{index}_STATUS_WORD_3
2284+
- Arinc429<Discrete>
2285+
- FADEC/ECU status word 3 for engine {index}
2286+
| Bit | Description |
2287+
|:---:|:------------|
2288+
| 22 | TOGA thrust limit active |
2289+
| 23 | FLEX thrust limit active |
2290+
| 24 | MCT thrust limit active |
2291+
| 25 | CLB thrust limit active |
2292+
22832293
- A32NX_FUEL_USED:{index}
22842294
- Number (Kg)
22852295
- Fuel burnt by engine {index} on deltaTime

fbw-a32nx/src/systems/shared/src/EwdMessages.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,7 @@ const EwdMessages = new Map<string, { group?: string; text: string }>([
180180
['213123504', { text: '\x1b<5m -CABIN CREW.......ALERT' }],
181181
['770064701', { group: 'ENG$2', text: ' THR LEVERS NOT SET' }],
182182
['770064702', { text: '\x1b<5m -THR LEVERS.....MCT/FLX' }],
183-
['770064703', { text: '\x1b<5m -THR LEVERS.....TO/GA' }],
184-
['770064201', { group: 'ENG$2', text: ' THR LEVERS NOT SET' }],
185-
['770064202', { text: '\x1b<5m -THR LEVERS.....TO/GA' }],
183+
['770064703', { text: '\x1b<5m -THR LEVERS........TOGA' }],
186184
['770038201', { group: 'ENG$3', text: ' REV SET' }],
187185
['770038202', { text: '\x1b<5m -THR LEVER......FWD THR' }],
188186
['290012601', { group: 'HYD$2', text: ' B RSVR OVHT' }],

fbw-a32nx/src/systems/systems-host/systems/FWC/PseudoFWC.ts

Lines changed: 144 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -978,6 +978,8 @@ export class PseudoFWC {
978978

979979
private readonly flightPhase23 = Subject.create(false);
980980

981+
private readonly flightPhase23489 = Subject.create(false);
982+
981983
private readonly flightPhase29 = Subject.create(false);
982984

983985
private readonly flightPhase34 = Subject.create(false);
@@ -1352,19 +1354,29 @@ export class PseudoFWC {
13521354

13531355
private readonly eng2AntiIce = Subject.create(false);
13541356

1355-
private readonly throttle1Position = Subject.create(0);
1357+
private readonly thr1TLA = Subject.create(0);
13561358

1357-
private readonly throttle2Position = Subject.create(0);
1359+
private readonly thr2TLA = Subject.create(0);
13581360

1359-
public readonly allThrottleIdle = Subject.create(false);
1361+
private readonly thr1TLAMCT = Subject.create(false);
13601362

1361-
private readonly eng1TLAReverse = Subject.create(false);
1363+
private readonly thr2TLAMCT = Subject.create(false);
13621364

1363-
private readonly eng2TLAReverse = Subject.create(false);
1365+
private readonly thr1TLAEndOfMCT = Subject.create(false);
13641366

1365-
private readonly revSetWarning = Subject.create(false);
1367+
private readonly thr2TLAEndOfMCT = Subject.create(false);
1368+
1369+
private readonly thr1TLABetweenCLAndMCT = Subject.create(false);
1370+
1371+
private readonly thr2TLABetweenCLAndMCT = Subject.create(false);
1372+
1373+
private readonly allThrTLAIdle = Subject.create(false);
1374+
1375+
private readonly thr1TLAReverse = Subject.create(false);
1376+
1377+
private readonly thr2TLAReverse = Subject.create(false);
13661378

1367-
public readonly allThrottleReverse = Subject.create(false);
1379+
private readonly allThrTLAReverse = Subject.create(false);
13681380

13691381
private readonly engine1ValueSwitch = ConsumerValue.create(null, false);
13701382

@@ -1374,17 +1386,53 @@ export class PseudoFWC {
13741386

13751387
private readonly atsDiscreteWord = Arinc429Register.empty();
13761388

1389+
private readonly ecu1StatusWord3Var = RegisteredSimVar.create<number>(
1390+
'L:A32NX_ECU_1_STATUS_WORD_3',
1391+
SimVarValueType.Number,
1392+
);
1393+
1394+
private readonly ecu1StatusWord3 = Arinc429Register.empty();
1395+
1396+
private readonly ecu2StatusWord3Var = RegisteredSimVar.create<number>(
1397+
'L:A32NX_ECU_2_STATUS_WORD_3',
1398+
SimVarValueType.Number,
1399+
);
1400+
1401+
private readonly ecu2StatusWord3 = Arinc429Register.empty();
1402+
13771403
private readonly ecu1MaintenanceWord6 = Arinc429Register.empty();
13781404

13791405
private readonly ecu2MaintenanceWord6 = Arinc429Register.empty();
13801406

13811407
private readonly thrLocked = Subject.create(false);
13821408

1383-
private readonly autothrustLeverWarningFlex = Subject.create(false);
1409+
private readonly thr1TLAMCTAndEngRunConf = new NXLogicConfirmNode(3, true);
1410+
1411+
private readonly thr2TLAMCTAndEngRunConf = new NXLogicConfirmNode(3, true);
1412+
1413+
private readonly thr1TLABetweenCLAndMCTAndEngRunConf = new NXLogicConfirmNode(4, true);
1414+
1415+
private readonly thr2TLABetweenCLAndMCTAndEngRunConf = new NXLogicConfirmNode(4, true);
1416+
1417+
private readonly eng1ThrLeversNotSetToga = Subject.create(false);
1418+
1419+
private readonly eng1ThrLeversNotSetFlex = Subject.create(false);
1420+
1421+
private readonly eng1ThrLeversNotSet = Subject.create(false);
1422+
1423+
private readonly eng2ThrLeversNotSetToga = Subject.create(false);
1424+
1425+
private readonly eng2ThrLeversNotSetFlex = Subject.create(false);
1426+
1427+
private readonly eng2ThrLeversNotSet = Subject.create(false);
1428+
1429+
private readonly thrLeversNotSetToga = Subject.create(false);
1430+
1431+
private readonly thrLeversNotSetFlex = Subject.create(false);
13841432

1385-
private readonly autothrustLeverWarningToga = Subject.create(false);
1433+
private readonly thrLeversNotSetWarning = Subject.create(false);
13861434

1387-
private readonly thrustLeverNotSet = Subject.create(false);
1435+
private readonly revSetWarning = Subject.create(false);
13881436

13891437
private readonly eng1Or2TakeoffPowerConfirm = new NXLogicConfirmNode(60, false);
13901438

@@ -1888,18 +1936,22 @@ export class PseudoFWC {
18881936
this.flightPhase7PulseNode.write(flightPhase === 7, deltaTime);
18891937
this.flightPhase9PulseNode.write(flightPhase === 9, deltaTime);
18901938
this.flightPhase6For60Seconds.write(flightPhase === 6, deltaTime);
1939+
18911940
// flight phase convenience vars
18921941
this.flightPhase126.set(flightPhase === 1 || flightPhase === 2 || flightPhase === 6);
18931942
this.flightPhase129.set(flightPhase === 1 || flightPhase === 2 || flightPhase === 9);
18941943
this.flightPhase110.set(flightPhase === 1 || flightPhase === 10);
1895-
this.flightPhase12910.set(this.flightPhase129.get() || flightPhase === 10);
1944+
this.flightPhase12910.set(flightPhase === 1 || flightPhase === 2 || flightPhase === 9 || flightPhase === 10);
18961945
this.flightPhase23.set(flightPhase === 2 || flightPhase === 3);
1946+
this.flightPhase23489.set(
1947+
flightPhase === 2 || flightPhase === 3 || flightPhase === 4 || flightPhase === 8 || flightPhase === 9,
1948+
);
18971949
this.flightPhase29.set(flightPhase === 2 || flightPhase === 9);
18981950
this.flightPhase34.set(flightPhase === 3 || flightPhase === 4);
1899-
this.flightPhase345.set(this.flightPhase34.get() || flightPhase === 5);
1951+
this.flightPhase345.set(flightPhase === 3 || flightPhase === 4 || flightPhase === 5);
19001952
this.flightPhase567.set(flightPhase === 5 || flightPhase === 6 || flightPhase === 7);
19011953
this.flightPhase67.set(flightPhase === 6 || flightPhase === 7);
1902-
this.flightPhase678.set(this.flightPhase67.get() || flightPhase === 8);
1954+
this.flightPhase678.set(flightPhase === 6 || flightPhase === 7 || flightPhase === 8);
19031955
this.flightPhase78.set(flightPhase === 7 || flightPhase === 8);
19041956

19051957
// TO Config convenience vars
@@ -1964,23 +2016,31 @@ export class PseudoFWC {
19642016
this.engSelectorPosition.set(SimVar.GetSimVarValue('L:XMLVAR_ENG_MODE_SEL', 'Enum'));
19652017
this.eng1AntiIce.set(SimVar.GetSimVarValue('ENG ANTI ICE:1', 'bool'));
19662018
this.eng2AntiIce.set(SimVar.GetSimVarValue('ENG ANTI ICE:2', 'bool'));
1967-
this.throttle1Position.set(SimVar.GetSimVarValue('L:A32NX_AUTOTHRUST_TLA:1', 'number'));
1968-
this.throttle2Position.set(SimVar.GetSimVarValue('L:A32NX_AUTOTHRUST_TLA:2', 'number'));
2019+
this.thr1TLA.set(SimVar.GetSimVarValue('L:A32NX_AUTOTHRUST_TLA:1', 'number'));
2020+
this.thr2TLA.set(SimVar.GetSimVarValue('L:A32NX_AUTOTHRUST_TLA:2', 'number'));
19692021
this.autoThrustStatus.set(SimVar.GetSimVarValue('L:A32NX_AUTOTHRUST_STATUS', 'enum'));
19702022
this.atsDiscreteWord.setFromSimVar('L:A32NX_FCU_ATS_DISCRETE_WORD');
2023+
this.ecu1StatusWord3.set(this.ecu1StatusWord3Var.get());
2024+
this.ecu2StatusWord3.set(this.ecu2StatusWord3Var.get());
19712025
this.ecu1MaintenanceWord6.setFromSimVar('L:A32NX_ECU_1_MAINTENANCE_WORD_6');
19722026
this.ecu2MaintenanceWord6.setFromSimVar('L:A32NX_ECU_2_MAINTENANCE_WORD_6');
1973-
this.autothrustLeverWarningFlex.set(SimVar.GetSimVarValue('L:A32NX_AUTOTHRUST_THRUST_LEVER_WARNING_FLEX', 'bool'));
1974-
this.autothrustLeverWarningToga.set(SimVar.GetSimVarValue('L:A32NX_AUTOTHRUST_THRUST_LEVER_WARNING_TOGA', 'bool'));
1975-
this.allThrottleIdle.set(
1976-
this.throttle1Position.get() < 2.6 &&
1977-
this.throttle1Position.get() > -2 &&
1978-
this.throttle2Position.get() < 2.6 &&
1979-
this.throttle2Position.get() > -2,
1980-
);
1981-
this.eng1TLAReverse.set(this.throttle1Position.get() < -4.3);
1982-
this.eng2TLAReverse.set(this.throttle2Position.get() < -4.3);
1983-
this.allThrottleReverse.set(this.eng1TLAReverse.get() && this.eng2TLAReverse.get());
2027+
2028+
const thr1TLA = this.thr1TLA.get();
2029+
const thr2TLA = this.thr2TLA.get();
2030+
2031+
this.thr1TLAMCT.set(thr1TLA > 33.3 && thr1TLA < 36.7);
2032+
this.thr2TLAMCT.set(thr2TLA > 33.3 && thr2TLA < 36.7);
2033+
this.thr1TLAEndOfMCT.set(thr1TLA > 36.6 && thr1TLA < 36.7);
2034+
this.thr2TLAEndOfMCT.set(thr2TLA > 36.6 && thr2TLA < 36.7);
2035+
2036+
this.thr1TLABetweenCLAndMCT.set(thr1TLA > 22.9 && thr1TLA <= 33.3);
2037+
this.thr2TLABetweenCLAndMCT.set(thr2TLA > 22.9 && thr2TLA <= 33.3);
2038+
2039+
this.allThrTLAIdle.set(thr1TLA < 2.6 && thr1TLA > -2 && thr2TLA < 2.6 && thr2TLA > -2);
2040+
2041+
this.thr1TLAReverse.set(thr1TLA < -4.3);
2042+
this.thr2TLAReverse.set(thr2TLA < -4.3);
2043+
this.allThrTLAReverse.set(this.thr1TLAReverse.get() && this.thr2TLAReverse.get());
19842044

19852045
const masterCautionButtonLeft = SimVar.GetSimVarValue('L:PUSH_AUTOPILOT_MASTERCAUT_L', 'bool');
19862046
const masterCautionButtonRight = SimVar.GetSimVarValue('L:PUSH_AUTOPILOT_MASTERCAUT_R', 'bool');
@@ -2313,7 +2373,7 @@ export class PseudoFWC {
23132373
// A/THR OFF VOLUNTARY
23142374
const athrOffVoluntaryBelow50ft = this.radioHeight1.valueOr(2500) < 50 || this.radioHeight2.valueOr(2500) < 50;
23152375
const athrOffAllThrottleIdleMtrig = this.autoThrustOffVoluntaryAllThrottleIdleMtrigNode.write(
2316-
this.allThrottleIdle.get(),
2376+
this.allThrTLAIdle.get(),
23172377
deltaTime,
23182378
);
23192379
const athrOffVoluntaryAbove50AndIdle = !athrOffVoluntaryBelow50ft && athrOffAllThrottleIdleMtrig;
@@ -2333,7 +2393,7 @@ export class PseudoFWC {
23332393

23342394
const athrIdleOrInstinctive = athrOffVoluntaryAbove50AndIdle || this.autoThrustOffVoluntaryMtrigNodeRising1.read();
23352395
const athrNotReverseAndNotEngagedAndIdleOrInstinctive =
2336-
!this.allThrottleReverse.get() && this.autoThrustOffVoluntaryMtrigNodeFalling1.read() && athrIdleOrInstinctive;
2396+
!this.allThrTLAReverse.get() && this.autoThrustOffVoluntaryMtrigNodeFalling1.read() && athrIdleOrInstinctive;
23372397
this.autoThrustOffVoluntaryMtrigNodeRising4.write(athrNotReverseAndNotEngagedAndIdleOrInstinctive, deltaTime);
23382398
this.autoThrustOffVoluntaryMtrigNodeRising3.write(athrNotReverseAndNotEngagedAndIdleOrInstinctive, deltaTime);
23392399

@@ -2353,10 +2413,10 @@ export class PseudoFWC {
23532413
this.autoThrustOffInvoluntaryPulseNode1.write(aThrEngaged, deltaTime);
23542414
this.autoThrustOffInvoluntaryPulseNode2.write(aThrEngaged, deltaTime);
23552415
this.autoThrustOffInvoluntaryPulseNode3.write(this.fwcFlightPhase.get() == 1, deltaTime);
2356-
this.autoThrustOffInvoluntaryMrtrigNode1.write(this.allThrottleIdle.get(), deltaTime);
2416+
this.autoThrustOffInvoluntaryMrtrigNode1.write(this.allThrTLAIdle.get(), deltaTime);
23572417

23582418
this.autoThrustOffInvoluntaryFlipFlop1.write(
2359-
!this.allThrottleReverse.get() &&
2419+
!this.allThrTLAReverse.get() &&
23602420
this.autoThrustOffInvoluntaryPulseNode1.read() &&
23612421
!this.autoThrustOffInvoluntaryMrtrigNode1.read() &&
23622422
!this.autoThrustOffVoluntaryMtrigNodeRising1.read(),
@@ -2421,14 +2481,51 @@ export class PseudoFWC {
24212481
}
24222482

24232483
// Engine Logic
2424-
this.thrustLeverNotSet.set(this.autothrustLeverWarningFlex.get() || this.autothrustLeverWarningToga.get());
2484+
this.thr1TLAMCTAndEngRunConf.write(this.engine1N2Sup.get() && this.thr1TLAMCT.get(), deltaTime);
2485+
this.thr1TLABetweenCLAndMCTAndEngRunConf.write(
2486+
this.engine1N2Sup.get() && this.thr1TLABetweenCLAndMCT.get(),
2487+
deltaTime,
2488+
);
2489+
this.eng1ThrLeversNotSetToga.set(
2490+
this.ecu1StatusWord3.bitValueOr(22, false) &&
2491+
(this.thr1TLAMCTAndEngRunConf.read() || this.thr1TLABetweenCLAndMCTAndEngRunConf.read()),
2492+
);
2493+
this.eng1ThrLeversNotSetFlex.set(
2494+
this.ecu1StatusWord3.bitValueOr(23, false) && this.thr1TLABetweenCLAndMCTAndEngRunConf.read(),
2495+
);
2496+
this.eng1ThrLeversNotSet.set(this.eng1ThrLeversNotSetToga.get() || this.eng1ThrLeversNotSetFlex.get());
2497+
2498+
this.thr2TLAMCTAndEngRunConf.write(this.engine2N2Sup.get() && this.thr2TLAMCT.get(), deltaTime);
2499+
this.thr2TLABetweenCLAndMCTAndEngRunConf.write(
2500+
this.engine2N2Sup.get() && this.thr2TLABetweenCLAndMCT.get(),
2501+
deltaTime,
2502+
);
2503+
this.eng2ThrLeversNotSetToga.set(
2504+
this.ecu2StatusWord3.bitValueOr(22, false) &&
2505+
(this.thr2TLAMCTAndEngRunConf.read() || this.thr2TLABetweenCLAndMCTAndEngRunConf.read()),
2506+
);
2507+
this.eng2ThrLeversNotSetFlex.set(
2508+
this.ecu2StatusWord3.bitValueOr(23, false) && this.thr2TLABetweenCLAndMCTAndEngRunConf.read(),
2509+
);
2510+
this.eng2ThrLeversNotSet.set(this.eng2ThrLeversNotSetToga.get() || this.eng2ThrLeversNotSetFlex.get());
2511+
2512+
this.thrLeversNotSetToga.set(this.eng1ThrLeversNotSetToga.get() || this.eng2ThrLeversNotSetToga.get());
2513+
this.thrLeversNotSetFlex.set(this.eng1ThrLeversNotSetFlex.get() || this.eng2ThrLeversNotSetFlex.get());
2514+
2515+
// TODO: Check double RETARD callout
2516+
this.thrLeversNotSetWarning.set(
2517+
((this.eng1ThrLeversNotSet.get() && !this.thr1TLAEndOfMCT.get()) ||
2518+
(this.eng2ThrLeversNotSet.get() && !this.thr2TLAEndOfMCT.get())) &&
2519+
this.flightPhase23489.get(),
2520+
);
2521+
24252522
// FIXME ECU doesn't have the necessary output words so we go purely on TLA
24262523
const flexThrustLimit = SimVar.GetSimVarValue('L:A32NX_AUTOTHRUST_THRUST_LIMIT_TYPE', 'number') === 3;
24272524
const toPower =
2428-
this.throttle1Position.get() >= 45 ||
2429-
(this.throttle1Position.get() >= 35 && flexThrustLimit) ||
2430-
this.throttle2Position.get() >= 45 ||
2431-
(this.throttle2Position.get() >= 35 && flexThrustLimit);
2525+
this.thr1TLA.get() >= 45 ||
2526+
(this.thr1TLA.get() >= 35 && flexThrustLimit) ||
2527+
this.thr2TLA.get() >= 45 ||
2528+
(this.thr2TLA.get() >= 35 && flexThrustLimit);
24322529
this.eng1Or2TakeoffPowerConfirm.write(toPower, deltaTime);
24332530
const raAbove1500 = this.radioHeight1.valueOr(0) > 1500 || this.radioHeight2.valueOr(0) > 1500;
24342531
this.eng1Or2TakeoffPower.set(toPower || (this.eng1Or2TakeoffPowerConfirm.read() && !raAbove1500));
@@ -2475,7 +2572,7 @@ export class PseudoFWC {
24752572
const configMemoComputed = this.toMemo.get() || this.ldgMemo.get();
24762573

24772574
this.revSetWarning.set(
2478-
(this.eng1TLAReverse.get() || this.eng2TLAReverse.get()) &&
2575+
(this.thr1TLAReverse.get() || this.thr2TLAReverse.get()) &&
24792576
!this.aircraftOnGround.get() &&
24802577
this.flightPhase567.get() &&
24812578
!(this.fwcFlightPhase.get() === 7 && this.wheel1SpeedAbove70kts.get()),
@@ -4744,7 +4841,7 @@ export class PseudoFWC {
47444841
!this.emergencyGeneratorOn.get() ? 1 : null,
47454842
5,
47464843
!(this.apuMasterSwitch.get() === 1 || this.apuAvail.get() === 1) && this.radioAlt.get() < 2500 ? 6 : null,
4747-
this.throttle1Position.get() > 0 || this.throttle2Position.get() > 0 ? 7 : null,
4844+
this.thr1TLA.get() > 0 || this.thr2TLA.get() > 0 ? 7 : null,
47484845
this.fac1Failed.get() === 1 ? 8 : null,
47494846
9,
47504847
10,
@@ -4790,10 +4887,8 @@ export class PseudoFWC {
47904887
),
47914888
whichCodeToReturn: () => [
47924889
0,
4793-
this.throttle1Position.get() !== 0 && !this.aircraftOnGround.get() ? 1 : null,
4794-
(this.throttle1Position.get() !== 0 || this.throttle2Position.get() !== 0) && this.aircraftOnGround.get()
4795-
? 2
4796-
: null,
4890+
this.thr1TLA.get() !== 0 && !this.aircraftOnGround.get() ? 1 : null,
4891+
(this.thr1TLA.get() !== 0 || this.thr2TLA.get() !== 0) && this.aircraftOnGround.get() ? 2 : null,
47974892
!this.sdac00200Word.bitValue(22) && this.aircraftOnGround.get() ? 3 : null,
47984893
!this.sdac00200Word.bitValue(22) && this.aircraftOnGround.get() ? 4 : null,
47994894
this.aircraftOnGround.get() ? 5 : null,
@@ -4846,10 +4941,8 @@ export class PseudoFWC {
48464941
),
48474942
whichCodeToReturn: () => [
48484943
0,
4849-
this.throttle2Position.get() !== 0 && !this.aircraftOnGround.get() ? 1 : null,
4850-
(this.throttle1Position.get() !== 0 || this.throttle2Position.get() !== 0) && this.aircraftOnGround.get()
4851-
? 2
4852-
: null,
4944+
this.thr2TLA.get() !== 0 && !this.aircraftOnGround.get() ? 1 : null,
4945+
(this.thr1TLA.get() !== 0 || this.thr2TLA.get() !== 0) && this.aircraftOnGround.get() ? 2 : null,
48534946
!this.sdac00200Word.bitValue(22) && this.aircraftOnGround.get() ? 3 : null,
48544947
!this.sdac00200Word.bitValue(22) && this.aircraftOnGround.get() ? 4 : null,
48554948
this.aircraftOnGround.get() ? 5 : null,
@@ -5246,7 +5339,7 @@ export class PseudoFWC {
52465339
this.cabAltSetResetState2.get() ? 3 : null,
52475340
this.cabAltSetResetState1.get() ? 4 : null,
52485341
this.cabAltSetResetState2.get() &&
5249-
(this.throttle1Position.get() !== 0 || this.throttle2Position.get() !== 0) &&
5342+
(this.thr1TLA.get() !== 0 || this.thr2TLA.get() !== 0) &&
52505343
this.autoThrustStatus.get() !== 2
52515344
? 5
52525345
: null,
@@ -5655,25 +5748,20 @@ export class PseudoFWC {
56555748
side: 'LEFT',
56565749
},
56575750
7700647: {
5658-
// THR LEVERS NOT SET (on ground)
5751+
// THR LEVERS NOT SET (on ground)
56595752
flightPhaseInhib: [1, 4, 5, 6, 7, 8, 10],
5660-
simVarIsActive: MappedSubject.create(
5661-
([throttle1Position, throttle2Position, thrustLeverNotSet]) =>
5662-
(throttle1Position !== 35 && thrustLeverNotSet) || (throttle2Position !== 35 && thrustLeverNotSet),
5663-
this.throttle1Position,
5664-
this.throttle2Position,
5665-
this.thrustLeverNotSet,
5666-
),
5753+
simVarIsActive: this.thrLeversNotSetWarning,
56675754
whichCodeToReturn: () => [
56685755
0,
5669-
this.autothrustLeverWarningFlex.get() ? 1 : null,
5670-
this.autothrustLeverWarningToga.get() ? 2 : null,
5756+
this.thrLeversNotSetFlex.get() ? 1 : null,
5757+
this.thrLeversNotSetToga.get() ? 2 : null,
56715758
],
56725759
codesToReturn: ['770064701', '770064702', '770064703'],
56735760
memoInhibit: () => false,
56745761
failure: 2,
56755762
sysPage: EcamSysPage.NONE,
56765763
side: 'LEFT',
5764+
monitorConfirmTime: 0,
56775765
},
56785766
3200070: {
56795767
// A/SKID N/WS OFF

fbw-a32nx/src/wasm/fbw_a320/src/FlyByWireInterface.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,7 @@ void FlyByWireInterface::setupLocalVariables() {
879879
for (int i = 0; i < 2; i++) {
880880
std::string idString = std::to_string(i + 1);
881881

882+
idEcuStatusWord3[i] = std::make_unique<LocalVariable>("A32NX_ECU_" + idString + "_STATUS_WORD_3");
882883
idEcuMaintenanceWord6[i] = std::make_unique<LocalVariable>("A32NX_ECU_" + idString + "_MAINTENANCE_WORD_6");
883884
}
884885
}
@@ -2713,6 +2714,7 @@ bool FlyByWireInterface::updateFadec(double sampleTime, int fadecIndex) {
27132714
fadecBusOutputs[fadecIndex] = fadecs[fadecIndex].getExternalOutputs().out.fadec_bus_output;
27142715
}
27152716

2717+
idEcuStatusWord3[fadecIndex]->set(Arinc429Utils::toSimVar(fadecBusOutputs[fadecIndex].ecu_status_word_3));
27162718
idEcuMaintenanceWord6[fadecIndex]->set(Arinc429Utils::toSimVar(fadecBusOutputs[fadecIndex].ecu_maintenance_word_6));
27172719

27182720
if (fmgcDisabled != -1) {

0 commit comments

Comments
 (0)