Skip to content

Commit

Permalink
fix(a380x/oans): Handle single-digit runway identifiers (#9603)
Browse files Browse the repository at this point in the history
* fix(a380x/oans): Handle single-digit runway identifiers

* changelog

* rectify QFU at AMDB import

* Revert "fix(a380x/oans): Handle single-digit runway identifiers"

This reverts commit 6c6d8ed.
  • Loading branch information
flogross89 authored Jan 6, 2025
1 parent 6fbbc10 commit 074143e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
1. [A380X/COND] Fix wasm crash during rapid decompression - @mjuhe (Miquel Juhe)
1. [A32NX/EWD] Corrected fuel flow step to 20kg/40lbs per hour - @BravoMike99 (bruno_pt99)
1. [A380X] Fix EWD avail. thrust fill area & PFD rudder trim visibility on ground - @flogross89 (floridude)
1. [A380X/OANS] Fix "BTV/FMS RWY DISAGREE" message for single-digit runway identifiers - @flogross89 (floridude)
1. [A380X/FWS] Add automatic normal checklists reset on powerup, go around & shutdown - @BravoMike99 (bruno_pt99)
1. [A32NX/PFD] Synchronize flashing/pulsing components across PFD - @lukecologne (luke)
1. [A380X/LIGHTS] Fix function of FCU brightness knobs - @heclak (Heclak)
Expand Down
24 changes: 23 additions & 1 deletion fbw-common/src/systems/instruments/src/OANC/Oanc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,29 @@ export class Oanc<T extends number> extends DisplayComponent<OancProps<T>> {
);

const features = Object.values(data).reduce(
(acc, it) => [...acc, ...it.features],
(acc, it) => {
const features = it.features.map((f) => {
// FeatureCollection
if (f.properties.idthr || f.properties.idrwy) {
const nf = Object.assign({}, f);
if (nf.properties.idthr && nf.properties.idthr.replace(/[^0-9]/g, '').length < 2) {
nf.properties.idthr = `0${nf.properties.idthr}`;
}

if (nf.properties.idrwy) {
nf.properties.idrwy = nf.properties.idrwy
.split('.')
.map((qfu) => (qfu.replace(/[^0-9]/g, '').length < 2 ? `0${qfu}` : qfu))
.join('.');
}

return nf;
}
return f;
});

return [...acc, ...features];
},
[] as Feature<Geometry, AmdbProperties>[],
);
const airportMap: AmdbFeatureCollection = featureCollection(features);
Expand Down

0 comments on commit 074143e

Please sign in to comment.