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(a380x/oans): OANS integration for A380X #8564

Merged
merged 711 commits into from
Sep 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
711 commits
Select commit Hold shift + click to select a range
46e4235
Merge branch 'master' into feat-a380x-oans
flogross89 Mar 11, 2024
80ee12f
ignore flight phase for BTV display; show BTV message at top of ND
flogross89 Mar 12, 2024
b32ecb0
merge fms-v2 into feat-a380x-oans
flogross89 Mar 12, 2024
3235ac3
implement Navigraph-less BTV fallback
flogross89 Mar 12, 2024
20c9d31
Merge branch 'master' into fms-v2
aguther Mar 17, 2024
5683499
feat: fms-v2 msfs sync (#8508)
Saschl Mar 18, 2024
3612c22
fix: approach mapping, off by one error and runway selection
Saschl Mar 20, 2024
17f190b
remove flightPlanTest
Saschl Mar 20, 2024
c0cadfa
fix: typing errors
Saschl Mar 20, 2024
bbfa446
fix: destination runways without secondary designator
Saschl Mar 20, 2024
985f247
fix: lint
Saschl Mar 20, 2024
981209b
fix(sync): use sensible defaults if mapping fails
Saschl Mar 20, 2024
e9fbdd1
fix: init issue after fixing other init issue
Saschl Mar 20, 2024
e366799
Fix wrong FD leg ident
BlueberryKing Mar 22, 2024
48ffe17
Improve arrival and departure pages
BlueberryKing Mar 22, 2024
4221c75
Handle explicit NO SID, NO STAR, etc. selection
BlueberryKing Mar 22, 2024
7947117
Refactor MPR selection
BlueberryKing Mar 22, 2024
65339fe
Merge remote-tracking branch 'upstream/master' into fms-v2
BlueberryKing Mar 22, 2024
a833eff
Merge branch 'fms-v2' of https://github.com/flybywiresim/aircraft int…
BlueberryKing Mar 22, 2024
803deb3
Fix missing disco after leg deletion in alternate
BlueberryKing Mar 22, 2024
1123df5
Remove arrival procedures after changing alternate
BlueberryKing Mar 22, 2024
5217910
Dump entire alternate plan when changing altn dest
BlueberryKing Mar 23, 2024
5aef002
feat: load MSFS flightplan in "SAVE" mode too
Saschl Mar 23, 2024
5c0c395
Remove commented code
BlueberryKing Mar 23, 2024
b06c814
Merge branch 'fms-v2' of https://github.com/flybywiresim/aircraft int…
BlueberryKing Mar 23, 2024
fe481af
Remove FacilityCache console logging
BlueberryKing Mar 23, 2024
efe2b80
Highlight entire row for selected approach
BlueberryKing Mar 23, 2024
f4c88d4
Allow repeated constraints in F-PLN page
BlueberryKing Mar 23, 2024
fa049ce
Remove duplicate code
BlueberryKing Mar 24, 2024
b94ea8d
Fix deletion of leg after CI at segment boundary
BlueberryKing Mar 24, 2024
eda1abe
Implement basic support for XI IF XF leg combination
BlueberryKing Mar 24, 2024
e89dcdc
Disable SEC fpln functionality for now
BlueberryKing Mar 24, 2024
3877dea
Disable fms-v2 tests until they are fixed
BlueberryKing Mar 24, 2024
08ce72d
improve error handling and runway designatorChars
Saschl Mar 24, 2024
f4c05d2
make loading and saving more resilient
Saschl Mar 25, 2024
458a304
Disable inoperative buttons
BlueberryKing Mar 25, 2024
6d5e164
Remove debugger statement
BlueberryKing Mar 25, 2024
1f30c2f
Fix WAYPOINT page entry
BlueberryKing Mar 25, 2024
f4b29ed
Fix missing error message after waypoint insertion
BlueberryKing Mar 25, 2024
053bb8d
fix: potential bogus comparison
Saschl Mar 26, 2024
bfa5b45
Merge branch 'fms-v2' into feat-a380x-oans
flogross89 Mar 26, 2024
7bcf973
Rebuild arrival after setting all alternate procedures
BlueberryKing Mar 26, 2024
23bbe06
fix BTV/FMS rwy disagree; transmit remaining rwy end distance after r…
flogross89 Mar 26, 2024
6360142
calculate LDA if none (or invalid) available from Navigraph data
flogross89 Mar 26, 2024
465795f
Handle missing geometry leg again
BlueberryKing Mar 27, 2024
e61e69b
Reset managed speed constraint after GA
BlueberryKing Mar 27, 2024
bd143fa
change Simvars to Arinc429; compute fallback data only if no Navigrap…
flogross89 Mar 28, 2024
c6f4283
Merge remote-tracking branch 'upstream/master' into fms-v2
BlueberryKing Mar 31, 2024
093e635
Increase VM leg size
BlueberryKing Apr 1, 2024
123b8d5
Make MRP side dependent
BlueberryKing Apr 1, 2024
0a98fa1
Remove dead code
BlueberryKing Apr 1, 2024
bb6517d
Fix AIRPORT button getting stuck
BlueberryKing Apr 1, 2024
6f946a8
Fix references to dead functions
BlueberryKing Apr 1, 2024
0ab07be
Merge remote-tracking branch 'upstream/master' into fms-v2
BlueberryKing Apr 1, 2024
0e03a7e
Merge branch 'fms-v2' into feat-a380x-oans
flogross89 Apr 1, 2024
482d25e
before touchdown, transmit BTV remaining distances from threshold loc…
flogross89 Apr 1, 2024
bd91f97
Merge remote-tracking branch 'upstream/master' into fms-v2
BlueberryKing Apr 2, 2024
00d070d
Fix typo
BlueberryKing Apr 2, 2024
f68bf26
Remove TODO for clarity
BlueberryKing Apr 2, 2024
ac51467
Sync cruise step deletion
BlueberryKing Apr 2, 2024
56265ab
Re-add licence identifier
BlueberryKing Apr 2, 2024
dc12ff8
Move `WaypointConstraintType`
BlueberryKing Apr 2, 2024
d9878d6
fix: do not transmit empty vectors if not needed
Saschl Apr 2, 2024
469ee20
[OANS] move moving map only if on ground or in ARC mode
flogross89 Apr 2, 2024
5dc361d
Encode MRP in ARINC429
BlueberryKing Apr 5, 2024
71cd446
Merge remote-tracking branch 'upstream/master' into fms-v2
BlueberryKing Apr 5, 2024
5e3be0f
Update comment
BlueberryKing Apr 6, 2024
0e1dab7
Remove unused arguments
BlueberryKing Apr 6, 2024
1519ca3
Fix wrong TO waypoint for runways
BlueberryKing Apr 6, 2024
5c8a8e5
[OANS] stop lines & labels
flogross89 Apr 3, 2024
9661b8d
stopping distance requested: Account for touch down zone distance
flogross89 Apr 7, 2024
a4ca404
BTV: Fix SimVar
flogross89 Apr 7, 2024
676a3bb
Fix EFB build again
BlueberryKing Apr 7, 2024
0415b78
fix: efb ts config
2hwk Apr 7, 2024
526e704
[OANS] potential fix for missing labels
flogross89 Apr 7, 2024
ce17f8d
Merge branch 'master' into fms-v2
2hwk Apr 8, 2024
c7a87b9
[OANS] draw stop line, update DRY/WET lines, visualize overrun status
flogross89 Apr 8, 2024
75bda12
fix: revert optimization until better solution found
Saschl Apr 8, 2024
e630f51
fix: new allocation optimisation for efis vector sync
2hwk Apr 8, 2024
57813f6
refactor: undefined -> null
2hwk Apr 8, 2024
1f38dc2
Add null check
BlueberryKing Apr 8, 2024
9dfce4c
Remove JS FMCDataManager
BlueberryKing Apr 8, 2024
a6cb232
[OANC] Don't show stop bar below 20kts, improved stop bar drawing, cl…
flogross89 Apr 8, 2024
912c66b
fix: hotfix for departure page issue with selecting new dep runway
2hwk Apr 9, 2024
a2f37ea
fix: only set atc crz flight level when defined, remove console logs
Saschl Apr 9, 2024
83083f4
Change runway ident format
BlueberryKing Apr 9, 2024
39c7f36
Merge branch 'fms-v2' of https://github.com/flybywiresim/aircraft int…
BlueberryKing Apr 9, 2024
5f29b35
fix: fpln sync after recent changes
Saschl Apr 9, 2024
41ca3bb
[OANS] move DRY/WET lines when floating above runway, fix STOP bar bug
flogross89 Apr 10, 2024
ea0f79c
Remove SID when changing runway
BlueberryKing Apr 10, 2024
65a848b
Remove arrival when changing approach
BlueberryKing Apr 10, 2024
463bd81
[OANS] fix WET/DRY labels in flight, improve exit validity check
flogross89 Apr 11, 2024
6d4814d
fix: text alignment for constraints (font still needs work)
2hwk Apr 12, 2024
f73824f
ci: Rename workflows from 'PR' to more descriptive names (#8614)
alepouna Apr 8, 2024
57e9a4f
feat(flight_model): Add drag from landing lights (#8554)
crocket63 Apr 9, 2024
203ff6d
refactor: Fadec rewrite using Cpp framework (#8547)
frankkopp Apr 11, 2024
7bc0448
fix(fadec): flex temp unit conversion (#8617)
Saschl Apr 11, 2024
fd04390
Show NOT ALLOWED upon procedure reselection
BlueberryKing Apr 12, 2024
bdf8be2
Merge legs after certain disco deletions
BlueberryKing Apr 12, 2024
ed220a1
Fix circling approach not showing up
BlueberryKing Apr 12, 2024
0d1041d
fix: Fixed bug in checklist to not display previous checklists as com…
frankkopp Apr 11, 2024
91e2e0e
Fix ND not updating after TMPY deletion
BlueberryKing Apr 13, 2024
d4f99f2
Merge remote-tracking branch 'upstream/master' into fms-v2
BlueberryKing Apr 13, 2024
c2dd86e
Fix disco deletion
BlueberryKing Apr 13, 2024
ba14758
[OANS] take runway length from Navigraph geometry (for improved stop …
flogross89 Apr 14, 2024
4f58ec8
Merge branch 'fms-v2' into feat-a380x-oans
flogross89 Apr 14, 2024
e8351e0
Show NOT ALLOWED upon procedure reselection
BlueberryKing Apr 12, 2024
89293b8
Merge legs after certain disco deletions
BlueberryKing Apr 12, 2024
d57cbb8
Fix circling approach not showing up
BlueberryKing Apr 12, 2024
6fb38bc
Fix ND not updating after TMPY deletion
BlueberryKing Apr 13, 2024
7fbe4c8
Fix disco deletion
BlueberryKing Apr 13, 2024
c3efdd0
fix: don't throw null true bearing when parsing discont
2hwk Apr 14, 2024
e32577e
fix: check for null vs truthiness
2hwk Apr 14, 2024
8e42ab0
Merge branch 'fms-v2' of https://github.com/flybywiresim/aircraft int…
BlueberryKing Apr 14, 2024
56ad887
fix: use strict !==
2hwk Apr 14, 2024
7157cf2
Merge branch 'fms-v2' of https://github.com/flybywiresim/aircraft int…
BlueberryKing Apr 14, 2024
3b091b5
Fix FREQ not shown after deduplicating airway fixes
BlueberryKing Apr 14, 2024
6934d42
Port tropopause uplink
BlueberryKing Apr 14, 2024
fa18ae1
Show NOT ALLOWED when attempting to clr ZFW/ZFWCG
BlueberryKing Apr 14, 2024
fef527e
Remove unused import
BlueberryKing Apr 14, 2024
f4f4dd6
[OANS] clamp stop bars to 100/200m behind end of rwy
flogross89 Apr 15, 2024
7e68dc2
[OANS] improve auto-load, let user select only exit lines
flogross89 Apr 15, 2024
ebbb7b5
Merge branch 'fms-v2' into feat-a380x-oans
flogross89 Apr 15, 2024
260644d
[OANS] various small fixes
flogross89 Apr 16, 2024
ed18556
HIde circling approaches
BlueberryKing Apr 16, 2024
26c6788
Show CLB or DES prompt when necessary
BlueberryKing Apr 16, 2024
f6a8905
Show NO TRANS when explicitly selected
BlueberryKing Apr 16, 2024
9b45d77
Show ENTRY for pilot constructed points on PROG page
BlueberryKing Apr 16, 2024
fd6bdaf
Filter STARs when only runway selected
BlueberryKing Apr 17, 2024
f89abf0
Revert "Show NO TRANS when explicitly selected"
BlueberryKing Apr 17, 2024
9e8c368
Fix NO SID, NO STAR selection not working
BlueberryKing Apr 18, 2024
b308e77
Improve automatic NONE selection
BlueberryKing Apr 18, 2024
c0fc48d
Improve automatic NONE trans selection
BlueberryKing Apr 18, 2024
5e7cb17
Handle missing airways during uplink
BlueberryKing Apr 20, 2024
76e2435
Merge remote-tracking branch 'upstream/master' into fms-v2
BlueberryKing Apr 20, 2024
d02c2c8
Merge branch 'fms-v2' into feat-a380x-oans
flogross89 Apr 21, 2024
dcb83f6
fms-v2 runway ident fixes
flogross89 Apr 21, 2024
d09f7a1
feat(fms): fm legs
tracernz Apr 22, 2024
0e70176
fix(fms): to wpt details for fm leg
tracernz Apr 22, 2024
8659650
Fix trans lvl being reset when changing runway
BlueberryKing Apr 22, 2024
a95a6bd
Fix runway formatting on PERF page
BlueberryKing Apr 22, 2024
f1eb495
implement "RWY AHEAD" advisory
flogross89 Apr 23, 2024
e2762e1
feat(utils): add angle normalise functions
tracernz Apr 23, 2024
4c25e19
fix(fms): fix vor station declination
tracernz Apr 23, 2024
810666e
display arrow, if airport outside range
flogross89 Apr 24, 2024
47a32a8
fix: handle "at or below" constraint
Saschl Apr 25, 2024
b3502a9
Merge branch 'master' into fms-v2
BlueberryKing Apr 25, 2024
8704ace
chore: update fms-v2 workflow
Saschl Apr 25, 2024
2fb16d5
Merge remote-tracking branch 'fbw/master' into fms-v2
Saschl Apr 25, 2024
357854d
fix: 380 fadec build
Saschl Apr 25, 2024
3157ad7
fix(fms): cf leg interpretation
tracernz Apr 27, 2024
2f5dae9
fix(fms): idf sids => also sids starting with cf leg
tracernz Apr 27, 2024
571401a
feat(fms): fa leg v0.0.1
tracernz Apr 27, 2024
80781a4
Merge branch 'refs/heads/master' into fms-v2
Benjozork Apr 27, 2024
f44dae8
fix: eslint ref
Benjozork Apr 27, 2024
715d22a
style: run lint after merge
Benjozork Apr 27, 2024
e7bf4b2
chore: fix lint
Benjozork Apr 27, 2024
a3c167b
chore: fix lint
Benjozork Apr 27, 2024
39634ee
Treat missed approach legs as climb constraints
BlueberryKing Apr 27, 2024
8aee5c4
Fix missed approach track not being shown
BlueberryKing Apr 28, 2024
8922551
Merge branch 'fms-v2' of https://github.com/flybywiresim/aircraft int…
BlueberryKing Apr 28, 2024
bdd35b8
Allow SID without runway
BlueberryKing Apr 28, 2024
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
589ecad
Merge commit '8aee5c4d4b46dc2e46f1ff0098b0f2f07eafe17b' into feat-a38…
flogross89 Apr 28, 2024
fc60d56
Merge commit '89225515e80f480614def83a82cabb2251b29f03' into feat-a38…
flogross89 Apr 28, 2024
eb42d57
lint-fix
flogross89 Apr 28, 2024
b2c57f0
Merge branch 'fms-v2' into feat-a380x-oans
flogross89 Apr 28, 2024
ce67e66
push pnpm-lock, fix build
flogross89 Apr 30, 2024
be8cf71
remove unused FlightPlanTest
flogross89 Apr 30, 2024
c13e5ef
a380x prettier format
flogross89 Apr 30, 2024
fc3e607
fix green arrow for similar runway QFUs
flogross89 May 2, 2024
d63d2f7
fix OANS RWY AHEAD
flogross89 May 2, 2024
389d916
update font for IF WET RWY TOO SHORT (fix for a32nx)
flogross89 May 3, 2024
2827ff4
subtract min. TDZ distance for remaining distances before reaching TDZ
flogross89 May 4, 2024
d15f7ce
update a32nx environment: Don't include OANC for now
flogross89 May 4, 2024
3471bcb
import updates
flogross89 May 5, 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
f46fd2c
sync RWY AHEAD to other ND
flogross89 May 11, 2024
b35f433
OANS: Fix RWY AHEAD for extreme longitudes
flogross89 May 11, 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
40b4d18
add "ARPT NOT IN ACTIVE F/PLN" message in OANS layer
flogross89 Jun 16, 2024
ed4847d
Merge branch 'master' into feat-a380x-oans
flogross89 Jun 16, 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
d9512a5
Merge branch 'master' into feat-a380x-oans
flogross89 Jun 19, 2024
3845c58
Merge branch 'fix-a380x-pfd-vdev' into feat-a380x-oans
flogross89 Jun 19, 2024
b2f3699
delete a380x/fmgc
flogross89 Jun 20, 2024
5a3bc93
disable typecheck for a380x
flogross89 Jun 20, 2024
f124645
update amdb navigraph client to use auth from Navigraph SDK
flogross89 Jun 20, 2024
be3ed43
fix unit test (will be deleted with MFD PR anyways)
flogross89 Jun 20, 2024
18f4f91
Merge branch 'master' into feat-a380x-oans
flogross89 Jun 20, 2024
aef65cf
[OANS] a32nx fixes
flogross89 Jun 21, 2024
ee66ece
limit canvas size: modify offset when airport is very away
flogross89 Jun 29, 2024
c67bc32
remove console output
flogross89 Jun 29, 2024
1bd2ea8
Merge branch 'master' into feat-a380x-oans
flogross89 Jul 19, 2024
676971a
update lockfile
flogross89 Jul 19, 2024
9411b47
fix merge errors
flogross89 Jul 19, 2024
1d6361e
remove a380x/MathUtils
flogross89 Jul 19, 2024
53bc365
remove VD
flogross89 Jul 26, 2024
d578cd4
Merge branch 'master' into feat-a380x-oans
flogross89 Jul 26, 2024
3404459
Merge branch 'master' into feat-a380x-oans
flogross89 Aug 8, 2024
2725a64
fix colors
flogross89 Aug 9, 2024
e64d2ee
Merge branch 'master' into feat-a380x-oans
flogross89 Aug 17, 2024
d0beb6b
migrate to MFD UI elements, fix errors
flogross89 Aug 18, 2024
2f1b070
update nav data
flogross89 Aug 18, 2024
167f50b
disable ROP/ROW/BTV distance update above 600ft AGL and when not in a…
flogross89 Aug 18, 2024
ef9353b
use font for ROT display
flogross89 Aug 19, 2024
251ca1e
update feature types
flogross89 Aug 20, 2024
9a76d70
add VD dummy
flogross89 Aug 20, 2024
d47372f
transmit NCD if not within operational ROP/ROW domain
flogross89 Aug 21, 2024
17923dd
[OANS] fix flight phase check
flogross89 Aug 22, 2024
2767eed
[OANS] improve turnaround time display
flogross89 Aug 22, 2024
fbc1dbc
Merge branch 'master' into feat-a380x-oans
flogross89 Aug 22, 2024
2d7ab71
Merge branch 'master' into feat-a380x-oans
flogross89 Aug 25, 2024
8dba295
renamed simvars
flogross89 Aug 25, 2024
c46be4f
fix ND messages bug
flogross89 Aug 26, 2024
f306adb
update copyright claims
flogross89 Aug 26, 2024
dd0dc23
clean up subjects/consumersubjects
flogross89 Aug 26, 2024
b7d6a36
css classes improvement
flogross89 Aug 26, 2024
c55d5c4
Merge branch 'master' into feat-a380x-oans
flogross89 Aug 26, 2024
6bd18d4
Merge branch 'master' into feat-a380x-oans
flogross89 Aug 31, 2024
bb49190
Merge branch 'master' into feat-a380x-oans
flogross89 Sep 1, 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
2 changes: 1 addition & 1 deletion fbw-a32nx/.env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VITE_BUILD=false
NODE_ENV=production
CLIENT_SECRET=""
CLIENT_ID=""
CLIENT_SECRET=""
SENTRY_DSN=""
AIRCRAFT_PROJECT_PREFIX="a32nx"
AIRCRAFT_VARIANT="a320-251n"
1 change: 1 addition & 0 deletions fbw-a32nx/mach.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ module.exports = {
msfsAvionicsInstrument('ND'),
msfsAvionicsInstrument('EWD'),
msfsAvionicsInstrument('Clock'),
msfsAvionicsInstrument('OANC'),

reactInstrument('SD'),
reactInstrument('DCDU'),
Expand Down
3 changes: 2 additions & 1 deletion fbw-a32nx/src/systems/instruments/src/ND/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"index": "./instrument.tsx",
"isInteractive": false,
"extraDeps": [
"fbw-common/src/systems/instruments/src/ND"
"fbw-common/src/systems/instruments/src/ND",
"fbw-common/src/systems/instruments/src/OANC"
]
}
4 changes: 3 additions & 1 deletion fbw-a32nx/src/systems/instruments/src/ND/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
"@tcas/*": ["./tcas/src/*"],
"@typings/*": ["../../../fbw-common/src/typings/*"],
"@flybywiresim/fbw-sdk": ["../../../fbw-common/src/systems/index-no-react.ts"],
"@flybywiresim/navigation-display": ["../../../fbw-common/src/systems/instruments/src/ND/index.ts"]
"@flybywiresim/navigation-display": ["../../../fbw-common/src/systems/instruments/src/ND/index.ts"],
"@flybywiresim/oanc": ["../../../fbw-common/src/systems/instruments/src/OANC/index.ts"],
"@flybywiresim/msfs-avionics-common": ["../../../fbw-common/src/systems/instruments/src/MsfsAvionicsCommon/index.ts"]
}
}
}
11 changes: 11 additions & 0 deletions fbw-a32nx/src/systems/instruments/src/OANC/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright (c) 2023-2024 FlyByWire Simulations
// SPDX-License-Identifier: GPL-3.0

'use strict';

module.exports = {
extends: '../../../../../../.eslintrc.js',

// overrides airbnb, use sparingly
rules: { 'react/react-in-jsx-scope': 'off', 'react/no-unknown-property': 'off', 'react/style-prop-object': 'off' },
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Copyright (c) 2023-2024 FlyByWire Simulations
// SPDX-License-Identifier: GPL-3.0

@import "../../Common/definitions";

.oanc-context-menu {
width: 180px;

display: flex;
flex-direction: column;

position: absolute;

margin: 7px 0 7px 0;

background-color: rgb(128, 128, 128);
border: solid 2px white;
}

.oanc-context-menu-item {
width: 100%;
height: 28px;

color: rgb(255, 255, 255);
font-size: 15px;

display: flex;
flex-direction: column;
justify-content: center;

padding-left: 3px;

border: solid 3px transparent;
}

.oanc-context-menu-item-disabled {
color: rgb(255, 255, 255, 0.7);
}

.oanc-context-menu-item:not(.oanc-context-menu-item-disabled):hover {
border: solid 3px $display-cyan;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
// Copyright (c) 2023-2024 FlyByWire Simulations
// SPDX-License-Identifier: GPL-3.0

import {
FSComponent,
DisplayComponent,
VNode,
MapSubject,
Subscribable,
Subscription,
SubscribableUtils,
} from '@microsoft/msfs-sdk';

import './ContextMenu.scss';
import { ContextMenuItemData } from '@flybywiresim/oanc';

export interface ContextMenuProps {
isVisible: Subscribable<boolean>;

x: Subscribable<number>;

y: Subscribable<number>;

items: ContextMenuItemData[];

closeMenu: () => void;
}

export class ContextMenu extends DisplayComponent<ContextMenuProps> {
private readonly subscriptions: Subscription[] = [];

private readonly style = MapSubject.create<string, string>();

onAfterRender() {
this.subscriptions.push(
this.props.isVisible.sub((it) => this.style.setValue('visibility', it ? 'visible' : 'hidden'), true),
this.props.x.sub((it) => this.style.setValue('left', `${it.toFixed(0)}px`), true),
this.props.y.sub((it) => this.style.setValue('top', `${it.toFixed(0)}px`), true),
);
}

private readonly handleItemPressed = (item: ContextMenuItemData) => {
item.onPressed?.();

this.props.closeMenu();
};

render(): VNode | null {
return (
<div class="oanc-context-menu" style={this.style}>
{this.props.items.map((it) => (
<ContextMenuItem
name={it.name}
disabled={SubscribableUtils.toSubscribable(it.disabled, true)}
onPressed={() => this.handleItemPressed(it)}
/>
))}
</div>
);
}
}

export interface ContextMenuItemProps {
name: string;

disabled: Subscribable<boolean>;

onPressed: () => void;
}

export class ContextMenuItem extends DisplayComponent<ContextMenuItemProps> {
private readonly root = FSComponent.createRef<HTMLSpanElement>();

onAfterRender() {
this.root.instance.addEventListener('click', this.handlePressed);
}

private handlePressed = () => this.props.onPressed();

render(): VNode | null {
return (
<span
ref={this.root}
class={{ 'oanc-context-menu-item': true, 'oanc-context-menu-item-disabled': this.props.disabled }}
>
{this.props.name}
</span>
);
}
}
Loading