Skip to content

Commit

Permalink
fix(a380x/fws): Various FWS fixes (flybywiresim#9047)
Browse files Browse the repository at this point in the history
* fix L: simvar typo

* improve speed selection considering AIR DATA knob

* fix OVERSPEED warnings, add L/G GEAR NOT DOWN warning, fix flaps TO warning

* fix ADR fault & overspeed logic

* move simvar doc

* fix ADR logic, remove L/G fault

* ADR logic fix
  • Loading branch information
flogross89 authored Oct 11, 2024
1 parent c5e89e3 commit 53c9f3c
Show file tree
Hide file tree
Showing 4 changed files with 169 additions and 111 deletions.
12 changes: 12 additions & 0 deletions fbw-a380x/docs/a380-simvars.md
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,18 @@
| 28 | Slat System Jam |
| 29 | Flap System Jam |

- A32NX_FLAPS_CONF_INDEX
- Number
- Indicates the desired flap configuration index according to the table
- Value | Meaning
--- | ---
0 | Conf0
1 | Conf1
2 | Conf1F
3 | Conf2
4 | Conf2S
5 | Conf3
6 | Conf4

## Indicating-Recording ATA 31

Expand Down
2 changes: 1 addition & 1 deletion fbw-a380x/src/systems/systems-host/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class SystemsHost extends BaseInstrument {

private readonly powerPublisher = new PowerSupplyBusses(this.bus);

private readonly fwsCore = new FwsCore(this.bus, this);
private readonly fwsCore = new FwsCore(1, this.bus, this);

/**
* "mainmenu" = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -954,8 +954,7 @@ export class FwsAbnormalSensed {
simVarIsActive: this.fws.mlgFireDetected,
notActiveWhenFaults: [],
whichItemsToShow: () => [
// Fixme: this should probably check the 3 adrs data
this.fws.adr1Cas.get().valueOr(0) > 250 || this.fws.adr1Mach.get().valueOr(0) > 0.55,
this.fws.computedAirSpeedToNearest2.get() > 250 || this.fws.machSelectedFromAdr.get() > 0.55,
true,
true,
true,
Expand Down Expand Up @@ -1498,8 +1497,8 @@ export class FwsAbnormalSensed {
// 34 NAVIGATION
340800001: {
// ADR 1 FAULT
flightPhaseInhib: [1, 4, 5, 10],
simVarIsActive: this.fws.adr1Fault,
flightPhaseInhib: [4, 5, 10],
simVarIsActive: this.fws.adr1Faulty,
notActiveWhenFaults: ['340800004', '340800008', '340800005'],
whichItemsToShow: () => [true, true, true, true],
whichItemsChecked: () => [
Expand All @@ -1520,8 +1519,8 @@ export class FwsAbnormalSensed {
},
340800002: {
// ADR 2 FAULT
flightPhaseInhib: [1, 4, 5, 10],
simVarIsActive: this.fws.adr2Fault,
flightPhaseInhib: [4, 5, 10],
simVarIsActive: this.fws.adr2Faulty,
notActiveWhenFaults: ['340800004', '340800008', '340800006'],
whichItemsToShow: () => [true, true],
whichItemsChecked: () => [
Expand All @@ -1540,8 +1539,8 @@ export class FwsAbnormalSensed {
},
340800003: {
// ADR 3 FAULT
flightPhaseInhib: [1, 4, 5, 10],
simVarIsActive: this.fws.adr3Fault,
flightPhaseInhib: [4, 5, 10],
simVarIsActive: this.fws.adr3Faulty,
notActiveWhenFaults: ['340800005', '340800006', '340800008'],
whichItemsToShow: () => [true, true, true, true],
whichItemsChecked: () => [
Expand All @@ -1558,8 +1557,8 @@ export class FwsAbnormalSensed {
},
340800004: {
// ADR 1+2 FAULT
flightPhaseInhib: [1, 4, 5, 10],
simVarIsActive: MappedSubject.create(SubscribableMapFunctions.and(), this.fws.adr1Fault, this.fws.adr2Fault),
flightPhaseInhib: [4, 5, 10],
simVarIsActive: MappedSubject.create(SubscribableMapFunctions.and(), this.fws.adr1Faulty, this.fws.adr2Faulty),
notActiveWhenFaults: ['340800008'],
whichItemsToShow: () => [true, true, true, true, true, true, true, true],
whichItemsChecked: () => [
Expand Down Expand Up @@ -1590,8 +1589,8 @@ export class FwsAbnormalSensed {
},
340800005: {
// ADR 1+3 FAULT
flightPhaseInhib: [1, 4, 5, 10],
simVarIsActive: MappedSubject.create(SubscribableMapFunctions.and(), this.fws.adr1Fault, this.fws.adr3Fault),
flightPhaseInhib: [4, 5, 10],
simVarIsActive: MappedSubject.create(SubscribableMapFunctions.and(), this.fws.adr1Faulty, this.fws.adr3Faulty),
notActiveWhenFaults: ['340800008'],
whichItemsToShow: () => [true, true, true, true, true, true, true, true],
whichItemsChecked: () => [
Expand Down Expand Up @@ -1622,8 +1621,8 @@ export class FwsAbnormalSensed {
},
340800006: {
// ADR 2+3 FAULT
flightPhaseInhib: [1, 4, 5, 10],
simVarIsActive: MappedSubject.create(SubscribableMapFunctions.and(), this.fws.adr2Fault, this.fws.adr3Fault),
flightPhaseInhib: [4, 5, 10],
simVarIsActive: MappedSubject.create(SubscribableMapFunctions.and(), this.fws.adr2Faulty, this.fws.adr3Faulty),
notActiveWhenFaults: ['340800008'],
whichItemsToShow: () => [true, true, true, true, true, true, true, true],
whichItemsChecked: () => [
Expand Down Expand Up @@ -1654,12 +1653,12 @@ export class FwsAbnormalSensed {
},
340800008: {
// ADR 1+2+3 FAULT
flightPhaseInhib: [1, 4, 5, 10],
flightPhaseInhib: [4, 5, 10],
simVarIsActive: MappedSubject.create(
SubscribableMapFunctions.and(),
this.fws.adr1Fault,
this.fws.adr2Fault,
this.fws.adr3Fault,
this.fws.adr1Faulty,
this.fws.adr2Faulty,
this.fws.adr3Faulty,
),
notActiveWhenFaults: ['340800010', '340800071'],
whichItemsToShow: () => [true, true, true],
Expand Down
Loading

0 comments on commit 53c9f3c

Please sign in to comment.