Skip to content

Commit

Permalink
refactor(a32nx): port legacy fms/mcdu to typescript (#9823)
Browse files Browse the repository at this point in the history
* refactor(fms): initial port of fms/mcdu to ts

* refactor: improve types

* fix: improve simbrief uplink error handling and use real message

* fix(fms): bug in createNewWaypoint

* chore(fms): remove unused

* refactor: add more types and remove unused

* fix(fms): vr speed clear

* refactor: improve simbridge types

* fix(fms): dest efob message clearing

* refactor: remove unnecessary param

* refactor: remove unecessary params

* fix(fms): error message

* fix(fms): approach filtering

* fix: declarations in case

* fix: treating undefined as zero..

* fix: treating string as number

* refactor: more types and unused cleanup

* fix: keyboard entry timeout

* fix: scratchpad message error handling

* fix(fms): fix info bugs

* refactor: arrivals page type errors

* fix: available departures page logic errors

* fix: ground temp set

* refactor: fix type error on corte page

* refactor: dir to type errors

* fix: number as string on perf page

* fix: disable unimplemented preselected des speed

* refactor: cdu field types

* fix: undefined function on init page

* fix: incorrect assignment on init page

* refactor: Arinc429OutputWord to replace the FM One

Pare it down to only what it actually needs for output words, to avoid getting saddled with a bunch of misuse that makes future work difficult.

* refactor: remove most of FmArinc429OutputWord

* fix: ndb type

* fix: fix type usage on hold page

* fix: wtf on irs init

* refactor: fix flightplan typing

* refactor: fix alt constraint type

* fix: loc bug on navaid page

* refactor: more type issues and unused

* refactor: fix info type issues

* fix: flight plan types and bugs

* refactor: oceanic req types and unused

* fix: improve cdu field types and bugs

* refactor: flightplan page type improvements

* refactor: bring back delta time

* chore: move non-page stuff

* refactor: adjust a32nx util imports... shared alias should be deleted

* fix: aoc init undeclared var

* fix: wrong type on atc connection notification

* refactor: more types for atsu

* fix: fansb vert request page link

* fix: fansb usual request send

* fix: fansb usual request page link

* refactor: fix some atsu types

* fix: atsu trying to access fms database (on different computer!)

* fix: atsu lat/lon handling

* fix: atsu temp handling

* fix: atsu emergency no atc messages

* fix: fansb free text message creation

* refactor: unused (invalid) param

* fix: atc menu atis link

* fix: atc message direction

* fix: atc message monitor page up/down

* fix: atc message uplink type

I am not sure the correct behaviour, but this will have the same one as before.

* refactor: fix import

* fix: unneeded conversion in atsu

* fix: alternate icao in atsu

* fix: use fms flight number

* fix: stored waypoints access

* fix: prog page padding

* fix: totally invalid call... atc lives on systems-host

* fix: atsu trying to access nav db

* fix: type error

* fix: misspelt call in aoc

* refactor: separate pages by interfaces

- breaks circular deps
- identifies problems for moving non-FMS pages out of the FMS
- prepares for shimming and wrapping the legacy pages into FMC framework pages

* refactor: break some more circular deps

* fix: fulfill api contract in msfs nav db

* fix: reimplement closest airports page

* refactor: remove old Fmgc global barrel and fix mistaken imports

* refactor: yeet msfs-navdata and clean up some types

* fix: types and some bugs in nx notif

* chore: comment out broken code in atc position report (typecheck)

* refactor: fix gpws types (typecheck)

* fix(fwc): invalid ra bug + no more navsystem for this.aircraft

* chore: work around mathjs type issues

* build: fix @flybywiresim/fbw-sdk for mcdu typecheck

Unfortunately that means you have to copy everything.. we should consider renaming index.ts to index-react.ts, and index-no-react.ts to index.ts.

* chore(vscode): fix auto-imports

It does the right thing much more often than any of the other options. Some of our messed up tsconfig paths can still trick it though. Those also cause barrel imports from inside the same "project" => circular refs.

* chore: fix after rebase

* refactor: remove not yet used code and old types

* refactor: change to a different hack for t-p

* fix: add type 2 to queue

Fixing this old logic caused it to work now, and find actual issues. We should handle more gracefully though and redirect the message to the queue.

* fix: fix info

* fix: WaypointEntryUtils.parsePlace NotInDatabase

* fix: dh

* fix: ils tuning page refresh
  • Loading branch information
tracernz authored Feb 4, 2025
1 parent 0e1ed4f commit 082cf1b
Show file tree
Hide file tree
Showing 333 changed files with 34,511 additions and 99,457 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
"xmemory0": "cpp"
},
"typescript.preferences.quoteStyle": "single",
"typescript.preferences.importModuleSpecifier": "non-relative"
"typescript.preferences.importModuleSpecifier": "project-relative"
,
"emeraldwalk.runonsave": {
"commands": [
Expand Down
9 changes: 5 additions & 4 deletions fbw-a32nx/mach.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ module.exports = {
typecheckingPlugin(),
],
instruments: [
msfsAvionicsInstrument('PFD'),
msfsAvionicsInstrument('ND'),
msfsAvionicsInstrument('EWD'),
msfsAvionicsInstrument('Clock'),
msfsAvionicsInstrument('OANC'),
msfsAvionicsInstrument('EWD'),
msfsAvionicsInstrument('FCU'),
msfsAvionicsInstrument('MCDU', 'McduBaseInstrument.ts'),
msfsAvionicsInstrument('ND'),
msfsAvionicsInstrument('OANC'),
msfsAvionicsInstrument('PFD'),

reactInstrument('SD'),
reactInstrument('DCDU'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ size_mm = 1024,1024
pixel_size = 1024,1024
texture = $FMC

htmlgauge00 = Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU.html, 0,0,1024,1024
htmlgauge00 = A32NX/MCDU/mcdu.html, 0,0,1024,1024

[VCockpit09]
size_mm = 1280,640
Expand Down

This file was deleted.

Loading

0 comments on commit 082cf1b

Please sign in to comment.