Skip to content

fix(a380x/oans): Handle single-digit runway identifiers #9603

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading