Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(pfd): (a32nx, third try): Add vertical deviation indicator, ROW/ROP/OANS warnings v3 #8733

Merged
merged 53 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
6749d0e
linting
flogross89 Apr 1, 2024
e8b91af
port LinearDeviationIndicator from a32nx PFD
flogross89 Apr 1, 2024
84a27dc
add PFD warnings for ROW, ROP, OANS
flogross89 Apr 1, 2024
5ffda3d
add speed margins to a380x
flogross89 Apr 1, 2024
eb690da
add ROP/ROW/OANS PFD warnings to a32nx
flogross89 Apr 1, 2024
03c1686
update two-line message, fix bug in getDisplayIndex()
flogross89 Apr 1, 2024
63d4622
make RWY TOO SHORT smaller
flogross89 Apr 1, 2024
6acdcab
Disable second ISIS; update colors for PFD tapes, PFD horizon, EWD TH…
flogross89 Apr 1, 2024
b191e91
restructure code, add A380X-only warnings
flogross89 Apr 4, 2024
065d66f
refactor Publisher structure, leave only data with existing sources
flogross89 Apr 5, 2024
d50e6a3
switch to data words for ROS/ROP and OANS PFD alerts
flogross89 Apr 5, 2024
ea8b511
clean up
flogross89 Apr 5, 2024
6e16c1e
feat: add some A429 utils
tracernz Apr 5, 2024
26ceb31
fix(pfd): tidy up publishers
tracernz Apr 5, 2024
0b8e7f9
feat: add fwc publisher
tracernz Apr 5, 2024
2dc347a
fix(pfd): use fwc data for stall warning
tracernz Apr 5, 2024
531377a
A380X: GPWS PFD alerts, ROP/ROW aural alerts,
flogross89 Apr 6, 2024
5a53630
use correct discrete word bit fields
flogross89 Apr 6, 2024
569ef58
Add ROP/ROW aural alerts to A32NX
flogross89 Apr 6, 2024
d913c02
fix lint after rebase
flogross89 Apr 6, 2024
177f25b
lint-fix
flogross89 Apr 28, 2024
389d916
update font for IF WET RWY TOO SHORT (fix for a32nx)
flogross89 May 3, 2024
f134667
lint + lint-fixes
flogross89 May 5, 2024
c6326f2
add LS reminder for ILS, frequency of ILS information has same font s…
flogross89 May 8, 2024
4bb36f6
consolidate to single definitions.scss, use standard colors for thrus…
flogross89 May 14, 2024
9409085
move ISIS changes to other PR
flogross89 May 14, 2024
b776c22
move logic from A32NX_FWC.js to PseudoFWC
flogross89 May 14, 2024
3fd5fab
inhibit single chimes for the first two seconds after power-on
flogross89 May 28, 2024
3922152
Merge branch 'master' into fix-a380x-pfd-vdev
flogross89 May 28, 2024
2f1b03b
Merge branch 'master' into fix-a380x-pfd-vdev
flogross89 Jun 15, 2024
d96655e
call correct gpwsUpdateDiscreteWords function in A32NX
flogross89 Jun 16, 2024
f29a0ba
Merge branch 'master' into fix-a380x-pfd-vdev
flogross89 Jun 16, 2024
f004d31
fix: wrong speedtape failure indication
Saschl Jun 17, 2024
2023abc
use Arinc429RegisterSubject for rowRop and oans words
flogross89 Jun 17, 2024
2a845d2
Merge branch 'master' into fix-a380x-pfd-vdev
flogross89 Jun 20, 2024
82b962d
disable global FBW_TYPECHECK
flogross89 Jun 20, 2024
de1eded
make compatible with RMP PR
flogross89 Jun 21, 2024
7fdf96b
a32nx fixes
flogross89 Jun 21, 2024
4d7fde6
a32nx: add stallwarningpublisher again
flogross89 Jun 25, 2024
e188713
fix stall warning
flogross89 Jun 29, 2024
760d7dc
Merge branch 'master' into fix-a380x-pfd-vdev
flogross89 Jun 29, 2024
2f2df46
fix: add missing setBitValue
Saschl Jun 29, 2024
3e8c8f1
use setBitValue as intended
flogross89 Jun 29, 2024
0ff5496
inhibit master caution/warning during PseudoFWC startup
flogross89 Jul 2, 2024
95c38f1
Merge branch 'master' into fix-a380x-pfd-vdev
flogross89 Jul 2, 2024
3f72525
Merge branch 'master' into fix-a380x-pfd-vdev
flogross89 Jul 2, 2024
04cddc9
clear timer if FWC shuts down before timer elapsed
flogross89 Jul 2, 2024
9268a95
remove a380x parts 1
flogross89 Jul 3, 2024
cfa0703
Merge branch 'master' into fix-a380x-pfd-vdev
flogross89 Jul 3, 2024
55625ea
Merge branch 'master' into fix-a380x-pfd-vdev
Saschl Jul 4, 2024
f555b15
fix the issue
Saschl Jul 4, 2024
5cc5cc9
Merge branch 'master' into fix-a380x-pfd-vdev
Saschl Jul 4, 2024
d774f1f
Merge branch 'master' into fix-a380x-pfd-vdev
flogross89 Jul 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
A380X: GPWS PFD alerts, ROP/ROW aural alerts,
A32NX: Add GPWS discrete word to GPWS,
Both: warnings position update
  • Loading branch information
flogross89 committed Apr 28, 2024
commit 531377a81f419f2401fc64133dc65521468bc8df
21 changes: 21 additions & 0 deletions fbw-a32nx/docs/a320-simvars.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- [Landing Gear (ATA 32)](#landing-gear-ata-32)
- [ATC (ATA 34)](#atc-ata-34)
- [Radio Altimeter (ATA 34)](#radio-altimeter-ata-34)
- [GPWS / TAWS (ATA 34)](#gpws--taws-ata-34)
- [ROW / ROP / OANS (ATA 34)](#row--rop--oans-ata-34)
- [Electronic Flight Bag (ATA 46)](#electronic-flight-bag-ata-46)

Expand Down Expand Up @@ -3900,6 +3901,26 @@ In the variables below, {number} should be replaced with one item in the set: {
- 1
- 2

## GPWS / TAWS (ATA 34)
- `A32NX_GPWS_{1 | 2}_DISCRETE_WORD`
- Data word for GPWS alerts. Used for displaying alerts on the PFD (on the A380)
- Arinc429<Discrete>
- | Bit | Description |
|:---:|:------------------------------------:|
| 11 | GPWS ON |
| 12 | GPWS failed |
| 13 | TAWS FLAP MODE OFF |
| 14 | TAWS G/S MODE OFF |
| 20 | GPWS Mode 1: Sink rate alert |
| 21 | GPWS Mode 1: Pull up alert |
| 22 | GPWS Mode 2: Terrain alert |
| 23 | GPWS Mode 2: Pull up alert |
| 24 | GPWS Mode 3: Don't sink alert |
| 25 | GPWS Mode 4: Too low terrain alert |
| 26 | GPWS Mode 4A/AB: Too low gear alert |
| 27 | GPWS Mode 4B: Too low flaps alert |
| 28 | GPWS Mode 5: Glide slope alert |

## ROW / ROP / OANS (ATA 34)

- A32NX_ROW_ROP_WORD_1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2306,15 +2306,50 @@
</Requires>
</Sound>

<!-- Stall warning =====================================================================-->
<Sound WwiseEvent="aural_stall_new" WwiseData="true" NodeName="PEDALS_LEFT" LocalVar="A32NX_AUDIO_STALL_WARNING" Continuous="true">
<Range LowerBound="1"/>
<Requires SimVar="ELECTRICAL MAIN BUS VOLTAGE" Units="VOLTS" Index="1">
<Range LowerBound="28" />
</Requires>
</Sound>

<!-- ROP/ROW warnings =====================================================================-->
<Sound WwiseEvent="brake_max_braking" WwiseData="true" NodeName="Wiper_Base_l" LocalVar="A32NX_AUDIO_ROP_MAX_BRAKING" Continuous="true">
<Range LowerBound="1"/>
<Requires SimVar="ELECTRICAL MAIN BUS VOLTAGE" Units="VOLTS" Index="1">
<Range LowerBound="28" />
</Requires>
</Sound>

<Sound WwiseEvent="set_max_reverse" WwiseData="true" NodeName="Wiper_Base_l" LocalVar="A32NX_AUDIO_ROW_SET_MAX_REVERSE" Continuous="true">
<Range LowerBound="1"/>
<Requires SimVar="ELECTRICAL MAIN BUS VOLTAGE" Units="VOLTS" Index="1">
<Range LowerBound="28" />
</Requires>
</Sound>

<Sound WwiseEvent="keep_max_reverse" WwiseData="true" NodeName="Wiper_Base_l" LocalVar="A32NX_AUDIO_ROP_KEEP_MAX_REVERSE" Continuous="false">
<Range LowerBound="1"/>
<Requires SimVar="ELECTRICAL MAIN BUS VOLTAGE" Units="VOLTS" Index="1">
<Range LowerBound="28" />
</Requires>
</Sound>

<Sound WwiseEvent="runway_too_short" WwiseData="true" NodeName="Wiper_Base_l" LocalVar="A32NX_AUDIO_ROW_RWY_TOO_SHORT" Continuous="true">
<Range LowerBound="1"/>
<Requires SimVar="ELECTRICAL MAIN BUS VOLTAGE" Units="VOLTS" Index="1">
<Range LowerBound="28" />
</Requires>
</Sound>

</SimVarSounds>

<!-- AvionicSounds ========================================================================================== -->

<AvionicSounds>
<Sound WwiseData="true" WwiseEvent="cchordshort" Continuous="false" NodeName="PEDALS_LEFT" ViewPoint="Inside"/>
<Sound WwiseData="true" WwiseEvent="cchordloop" Continuous="true" NodeName="PEDALS_LEFT" ViewPoint="Inside"/>
<Sound WwiseData="true" WwiseEvent="aural_stall" />
<Sound WwiseData="true" WwiseEvent="aural_stall_new" NodeName="PEDALS_LEFT" ViewPoint="Inside" />
<Sound WwiseData="true" WwiseEvent="aural_pull_up" />
<Sound WwiseData="true" WwiseEvent="aural_pullup_new" Continuous="false" NodeName="PEDALS_LEFT" ViewPoint="Inside"/>
<Sound WwiseData="true" WwiseEvent="aural_overspeed" />
Expand Down Expand Up @@ -2388,13 +2423,6 @@
<Sound WwiseData="true" WwiseEvent="traffic_traffic" NodeName="Wiper_Base_l" />
<Sound WwiseData="true" WwiseEvent="TCAS_sys_test_OK" NodeName="Wiper_Base_l" />

<!-- ROPS callouts ==================================================================================== -->

<Sound WwiseData="true" WwiseEvent="brake_max_braking" NodeName="Wiper_Base_l" />
<Sound WwiseData="true" WwiseEvent="keep_max_reverse" NodeName="Wiper_Base_l" />
<Sound WwiseData="true" WwiseEvent="runway_too_short" NodeName="Wiper_Base_l" />
<Sound WwiseData="true" WwiseEvent="set_max_reverse" NodeName="Wiper_Base_l" />

</AvionicSounds>

<!-- AnimationSounds ========================================================================================== -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,25 @@ class A32NX_GPWS {
this.AltCallState.setState("ground");
this.RetardState = A32NX_Util.createMachine(RetardStateMachine);
this.RetardState.setState("landed");

this.gpwsDiscreteWord = Arinc429Word.empty();
}

GPWSUpdateDiscreteWord() {
this.gpwsDiscreteWord.ssm = Arinc429SignStatusMatrix.NormalOperation;
this.gpwsDiscreteWord.setBitValue(11, true);
this.gpwsDiscreteWord.setBitValue(12, false);
this.gpwsDiscreteWord.setBitValue(20, this.modes[0].current === 1);
this.gpwsDiscreteWord.setBitValue(21, this.modes[0].current === 2);
this.gpwsDiscreteWord.setBitValue(22, this.modes[1].current === 1);
this.gpwsDiscreteWord.setBitValue(23, this.modes[1].current === 2);
this.gpwsDiscreteWord.setBitValue(24, this.modes[2].current === 1);
this.gpwsDiscreteWord.setBitValue(25, this.modes[3].current === 3);
this.gpwsDiscreteWord.setBitValue(26, this.modes[3].current === 1);
this.gpwsDiscreteWord.setBitValue(27, this.modes[3].current === 2);
this.gpwsDiscreteWord.setBitValue(28, this.modes[4].current === 1);
Arinc429Word.toSimVarValue('L:A32NX_GPWS_1_DISCRETE_WORD', this.gpwsDiscreteWord.value, this.gpwsDiscreteWord.ssm);
Arinc429Word.toSimVarValue('L:A32NX_GPWS_2_DISCRETE_WORD', this.gpwsDiscreteWord.value, this.gpwsDiscreteWord.ssm);
}

init() {
Expand Down Expand Up @@ -176,6 +195,7 @@ class A32NX_GPWS {
}

this.GPWSComputeLightsAndCallouts();
this.GPWSUpdateDiscreteWord();

if ((mda !== 0 || (dh !== -1 && dh !== -2) && phase === FmgcFlightPhases.APPROACH)) {
let minimumsDA; //MDA or DH
Expand Down
3 changes: 1 addition & 2 deletions fbw-a32nx/src/systems/instruments/src/PFD/instrument.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

import { Clock, FSComponent, HEventPublisher, InstrumentBackplane, Subject } from '@microsoft/msfs-sdk';
import { ArincEventBus } from '@flybywiresim/fbw-sdk';
import { FwcPublisher, RopRowOansPublisher } from '@flybywiresim/msfs-avionics-common';

import { RopRowOansPublisher } from '@flybywiresim/pfd';
import { FwcPublisher } from '@flybywiresim/msfs-avionics-common';
import { FmsDataPublisher } from '../MsfsAvionicsCommon/providers/FmsDataPublisher';
import { DmcPublisher } from '../MsfsAvionicsCommon/providers/DmcPublisher';
import { getDisplayIndex, PFDComponent } from './PFD';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,43 @@
</Requires>
</Sound>

<!-- Stall warning =====================================================================-->
<Sound WwiseEvent="aural_stall_new" WwiseData="true" NodeName="PEDALS_LEFT" LocalVar="A32NX_AUDIO_STALL_WARNING" Continuous="true">
<Range LowerBound="1"/>
<Requires SimVar="ELECTRICAL MAIN BUS VOLTAGE" Units="VOLTS" Index="1">
<Range LowerBound="28" />
</Requires>
</Sound>

<!-- ROP/ROW warnings =====================================================================-->
<Sound WwiseEvent="brake_max_braking" WwiseData="true" NodeName="Wiper_Base_l" LocalVar="A32NX_AUDIO_ROP_MAX_BRAKING" Continuous="true">
<Range LowerBound="1"/>
<Requires SimVar="ELECTRICAL MAIN BUS VOLTAGE" Units="VOLTS" Index="1">
<Range LowerBound="28" />
</Requires>
</Sound>

<Sound WwiseEvent="set_max_reverse" WwiseData="true" NodeName="Wiper_Base_l" LocalVar="A32NX_AUDIO_ROW_SET_MAX_REVERSE" Continuous="true">
<Range LowerBound="1"/>
<Requires SimVar="ELECTRICAL MAIN BUS VOLTAGE" Units="VOLTS" Index="1">
<Range LowerBound="28" />
</Requires>
</Sound>

<Sound WwiseEvent="keep_max_reverse" WwiseData="true" NodeName="Wiper_Base_l" LocalVar="A32NX_AUDIO_ROP_KEEP_MAX_REVERSE" Continuous="false">
<Range LowerBound="1"/>
<Requires SimVar="ELECTRICAL MAIN BUS VOLTAGE" Units="VOLTS" Index="1">
<Range LowerBound="28" />
</Requires>
</Sound>

<Sound WwiseEvent="runway_too_short" WwiseData="true" NodeName="Wiper_Base_l" LocalVar="A32NX_AUDIO_ROW_RWY_TOO_SHORT" Continuous="true">
<Range LowerBound="1"/>
<Requires SimVar="ELECTRICAL MAIN BUS VOLTAGE" Units="VOLTS" Index="1">
<Range LowerBound="28" />
</Requires>
</Sound>

</SimVarSounds>

<!-- AvionicSounds ========================================================================================== -->
Expand Down Expand Up @@ -1187,13 +1224,6 @@
<Sound WwiseData="true" WwiseEvent="traffic_traffic" NodeName="WIPER_BASE_L" />
<Sound WwiseData="true" WwiseEvent="TCAS_sys_test_OK" NodeName="WIPER_BASE_L" />

<!-- ROPS callouts ==================================================================================== -->

<Sound WwiseData="true" WwiseEvent="brake_max_braking" NodeName="WIPER_BASE_L" />
<Sound WwiseData="true" WwiseEvent="keep_max_reverse" NodeName="WIPER_BASE_L" />
<Sound WwiseData="true" WwiseEvent="runway_too_short" NodeName="WIPER_BASE_L" />
<Sound WwiseData="true" WwiseEvent="set_max_reverse" NodeName="WIPER_BASE_L" />

</AvionicSounds>

<!-- AnimationSounds ========================================================================================== -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ConsumerSubject, DisplayComponent, EventBus, FSComponent, MappedSubject, SimVarPublisher, SimVarValueType, Subject, VNode } from '@microsoft/msfs-sdk';

import { ArincEventBus } from '@flybywiresim/fbw-sdk';
import { DisplayComponent, FSComponent, MappedSubject, Subject, VNode } from '@microsoft/msfs-sdk';
import { Arinc429RegisterSubject, ArincEventBus } from '@flybywiresim/fbw-sdk';
import { TawsDataEvents } from '@flybywiresim/msfs-avionics-common';

interface AttitudeIndicatorWarningsA380Props {
bus: ArincEventBus;
Expand All @@ -10,29 +10,30 @@ interface AttitudeIndicatorWarningsA380Props {
export class AttitudeIndicatorWarningsA380 extends DisplayComponent<AttitudeIndicatorWarningsA380Props> {
private readonly warningGroupRef = FSComponent.createRef<SVGGElement>();

// FIXME no source yet
private readonly gpwsPullUpActive = Subject.create(false);
private readonly gpwsWord = Arinc429RegisterSubject.createEmpty();

private readonly gpwsPullUpActive = this.gpwsWord.map((w) => w.bitValueOr(21, false) || w.bitValueOr(23, false));

// FIXME no source yet
private readonly gpwsSinkRateActive = Subject.create(false);
private readonly gpwsSinkRateActive = this.gpwsWord.map((w) => w.bitValueOr(20, false));

// FIXME no source yet
private readonly gpwsDontSinkActive = Subject.create(false);
private readonly gpwsDontSinkActive = this.gpwsWord.map((w) => w.bitValueOr(24, false));

// FIXME no source yet
private readonly gpwsTooLowGearActive = Subject.create(false);
private readonly gpwsTooLowGearActive = this.gpwsWord.map((w) => w.bitValueOr(26, false));

// FIXME no source yet
private readonly gpwsTooLowTerrainActive = Subject.create(false);
private readonly gpwsTooLowTerrainActive = this.gpwsWord.map((w) => w.bitValueOr(25, false));

// FIXME no source yet
private readonly gpwsTooLowFlapsActive = Subject.create(false);
private readonly gpwsTooLowFlapsActive = this.gpwsWord.map((w) => w.bitValueOr(27, false));

// FIXME no source yet
private readonly gpwsGlideSlopeActive = Subject.create(false);
private readonly gpwsGlideSlopeActive = this.gpwsWord.map((w) => w.bitValueOr(28, false));

onAfterRender(node: VNode): void {
super.onAfterRender(node);

const sub = this.props.bus.getSubscriber<TawsDataEvents>();

sub.on('gpws_discrete_word_1').whenChanged().handle((v) => {
this.gpwsWord.setWord(v);
});
}

render(): VNode {
Expand Down
5 changes: 4 additions & 1 deletion fbw-a380x/src/systems/instruments/src/PFD/instrument.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Clock, FSComponent, HEventPublisher, InstrumentBackplane, Subject } from '@microsoft/msfs-sdk';
import { ArincEventBus, EfisSide } from '@flybywiresim/fbw-sdk';
import { RopRowOansPublisher } from '@flybywiresim/pfd';
import { getDisplayIndex } from 'instruments/src/MsfsAvionicsCommon/CdsDisplayUnit';
import { DmcEvents, DmcPublisher } from 'instruments/src/MsfsAvionicsCommon/providers/DmcPublisher';
import { FmsDataPublisher } from 'instruments/src/MsfsAvionicsCommon/providers/FmsDataPublisher';
Expand All @@ -11,6 +10,7 @@ import { PFDSimvarPublisher } from './shared/PFDSimvarPublisher';
import { SimplaneValueProvider } from './shared/SimplaneValueProvider';

import './style.scss';
import { RopRowOansPublisher, TawsPublisher } from '@flybywiresim/msfs-avionics-common';

class A380X_PFD extends BaseInstrument {
private readonly bus = new ArincEventBus();
Expand All @@ -35,6 +35,8 @@ class A380X_PFD extends BaseInstrument {

private readonly ropRowOansPublisher = new RopRowOansPublisher(this.bus);

private readonly tawsPublisher = new TawsPublisher(this.bus);

constructor() {
super();

Expand All @@ -51,6 +53,7 @@ class A380X_PFD extends BaseInstrument {
this.backplane.addPublisher('DmcPublisher', this.dmcPublisher);
this.backplane.addPublisher('FmsDataPublisher', this.fmsDataPublisher);
this.backplane.addPublisher('RopRowOansPublisher', this.ropRowOansPublisher);
this.backplane.addPublisher('TawsPublisher', this.tawsPublisher);
}

get templateID(): string {
Expand Down
3 changes: 2 additions & 1 deletion fbw-a380x/src/systems/instruments/src/PFD/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"@tcas/*": ["./tcas/src/*"],
"@typings/*": ["../typings"],
"@flybywiresim/fbw-sdk": ["../../../fbw-common/src/systems/index-no-react.ts"],
"@flybywiresim/pfd": ["../../../fbw-common/src/systems/instruments/src/PFD/index.ts"]
"@flybywiresim/pfd": ["../../../fbw-common/src/systems/instruments/src/PFD/index.ts"],
"@flybywiresim/msfs-avionics-common": ["../../../fbw-common/src/systems/instruments/src/MsfsAvionicsCommon/index.ts"]
}
}
}
27 changes: 26 additions & 1 deletion fbw-a380x/src/systems/systems-host/systems/LegacyFwc.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable no-underscore-dangle */
/* eslint-disable camelcase */
// TODO remove this once Rust implementation is up and running
import { Arinc429Word } from '@flybywiresim/fbw-sdk';
import { Arinc429RegisterSubject, Arinc429Word } from '@flybywiresim/fbw-sdk';

enum FwcFlightPhase {
ElecPwr = 1,
Expand Down Expand Up @@ -168,6 +168,7 @@ export class LegacyFwc {
this._updateTakeoffMemo(_deltaTime);
this._updateLandingMemo(_deltaTime);
this._updateAltitudeWarning();
this.updateRowRopWarnings();
}

_updateButtons(_deltaTime: number) {
Expand Down Expand Up @@ -489,6 +490,30 @@ export class LegacyFwc {
}
return true;
}

updateRowRopWarnings() {
const w = Arinc429Word.fromSimVarValue('L:A32NX_ROW_ROP_WORD_1');

// ROW
SimVar.SetSimVarValue('L:A32NX_AUDIO_ROW_RWY_TOO_SHORT', 'bool', w.getBitValueOr(15, false));

// ROP
// MAX BRAKING, only for manual braking, if maximum pedal braking is not applied
const maxBrakingSet = SimVar.GetSimVarValue('L:A32NX_LEFT_BRAKE_PEDAL_INPUT', 'number') > 90 || SimVar.GetSimVarValue('L:A32NX_RIGHT_BRAKE_PEDAL_INPUT', 'number') > 90;
const maxBraking = w.getBitValueOr(13, false) && !maxBrakingSet;
SimVar.SetSimVarValue('L:A32NX_AUDIO_ROP_MAX_BRAKING', 'bool', maxBraking);

// SET MAX REVERSE, if not already max. reverse set and !MAX_BRAKING
const maxReverseSet = SimVar.GetSimVarValue('L:XMLVAR_Throttle2Position', 'number') < 0.1 && SimVar.GetSimVarValue('L:XMLVAR_Throttle3Position', 'number') < 0.1;
const maxReverse = w.getBitValueOr(12, false) && !maxReverseSet;
SimVar.SetSimVarValue('L:A32NX_AUDIO_ROW_SET_MAX_REVERSE', 'bool', !maxBraking && maxReverse);

// At 80kt, KEEP MAX REVERSE once, if max. reversers deployed
const ias = SimVar.GetSimVarValue('AIRSPEED INDICATED', 'knots');
SimVar.SetSimVarValue('L:A32NX_AUDIO_ROP_KEEP_MAX_REVERSE', 'bool', (ias <= 80 && ias > 4) && (w.getBitValueOr(12, false) || w.getBitValueOr(13, false)));


}
}

/*
Expand Down
Loading