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
fix(pfd): tidy up publishers
  • Loading branch information
tracernz authored and flogross89 committed Apr 28, 2024
commit 26ceb31ee411cd2a04e092646fdc1dcc01a9b940
58 changes: 27 additions & 31 deletions fbw-a32nx/src/systems/instruments/src/PFD/instrument.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
//
// SPDX-License-Identifier: GPL-3.0

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

import { DmcPublisher } from 'instruments/src/MsfsAvionicsCommon/providers/DmcPublisher';
import { FmsDataPublisher } from 'instruments/src/MsfsAvionicsCommon/providers/FmsDataPublisher';
import { RopRowOansPublisher } from '@flybywiresim/pfd';
import { FmsDataPublisher } from '../MsfsAvionicsCommon/providers/FmsDataPublisher';
import { DmcPublisher } from '../MsfsAvionicsCommon/providers/DmcPublisher';
import { getDisplayIndex, PFDComponent } from './PFD';
import { AdirsValueProvider } from '../MsfsAvionicsCommon/AdirsValueProvider';
import { ArincValueProvider } from './shared/ArincValueProvider';
Expand All @@ -19,25 +19,30 @@ import './style.scss';
// TODO move this whole thing to InstrumentBackplane and GameStateProvider

class A32NX_PFD extends BaseInstrument {
private bus: ArincEventBus;
private readonly bus = new ArincEventBus();

private simVarPublisher: PFDSimvarPublisher;
private readonly backplane = new InstrumentBackplane();

private readonly hEventPublisher;
private readonly simVarPublisher = new PFDSimvarPublisher(this.bus);

private readonly arincProvider: ArincValueProvider;
private readonly hEventPublisher = new HEventPublisher(this.bus);

private readonly simplaneValueProvider: SimplaneValueProvider;
private readonly arincProvider = new ArincValueProvider(this.bus);

private readonly clock: Clock;
private readonly simplaneValueProvider = new SimplaneValueProvider(this.bus);

private readonly clock = new Clock(this.bus);

// FIXME fit this into the normal backplane pattern
private adirsValueProvider: AdirsValueProvider<PFDSimvars>;

private readonly dmcPublisher: DmcPublisher;
private readonly dmcPublisher = new DmcPublisher(this.bus);

// FIXME fit this into the normal backplane pattern
private fmsDataPublisher: FmsDataPublisher;

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


/**
* "mainmenu" = 0
Expand All @@ -49,14 +54,14 @@ class A32NX_PFD extends BaseInstrument {

constructor() {
super();
this.bus = new ArincEventBus();
this.simVarPublisher = new PFDSimvarPublisher(this.bus);
this.hEventPublisher = new HEventPublisher(this.bus);
this.arincProvider = new ArincValueProvider(this.bus);
this.simplaneValueProvider = new SimplaneValueProvider(this.bus);
this.clock = new Clock(this.bus);
this.dmcPublisher = new DmcPublisher(this.bus);
this.ropRowOansPublisher = new RopRowOansPublisher(this.bus);

this.backplane.addPublisher('PfdSimvars', this.simVarPublisher);
this.backplane.addPublisher('hEvent', this.hEventPublisher);
this.backplane.addInstrument('arincProvider', this.arincProvider);
this.backplane.addInstrument('simPlane', this.simplaneValueProvider);
this.backplane.addInstrument('Clock', this.clock);
this.backplane.addPublisher('Dmc', this.dmcPublisher);
this.backplane.addPublisher('RopRowOans', this.ropRowOansPublisher);
}

get templateID(): string {
Expand All @@ -79,9 +84,7 @@ class A32NX_PFD extends BaseInstrument {
const stateSubject = Subject.create<'L' | 'R'>(getDisplayIndex() === 1 ? 'L' : 'R');
this.fmsDataPublisher = new FmsDataPublisher(this.bus, stateSubject);

this.arincProvider.init();
this.clock.init();
this.dmcPublisher.startPublish();
this.backplane.init();

FSComponent.render(<PFDComponent bus={this.bus} instrument={this} />, document.getElementById('PFD_CONTENT'));

Expand All @@ -95,24 +98,17 @@ class A32NX_PFD extends BaseInstrument {
public Update(): void {
super.Update();

this.backplane.onUpdate();

if (this.gameState !== 3) {
const gamestate = this.getGameState();
if (gamestate === 3) {
this.simVarPublisher.startPublish();
this.hEventPublisher.startPublish();
this.adirsValueProvider.start();
this.dmcPublisher.startPublish();
this.fmsDataPublisher.startPublish();
this.ropRowOansPublisher.startPublish();
}
this.gameState = gamestate;
} else {
this.simVarPublisher.onUpdate();
this.simplaneValueProvider.onUpdate();
this.clock.onUpdate();
this.dmcPublisher.onUpdate();
this.fmsDataPublisher.onUpdate();
this.ropRowOansPublisher.onUpdate();
}
}
}
Expand Down
Loading