From 5f8549d79dd3bc77c8a74551e7d67b5c0138d6ef Mon Sep 17 00:00:00 2001 From: Michael Corcoran Date: Sun, 26 Jan 2025 04:11:35 +1300 Subject: [PATCH 1/3] feat(a32nx/fms): add h4 db swap confirm --- .github/CHANGELOG.md | 1 + README.md | 4 +- .../CDU/A320_Neo_CDU_IdentPage.js | 51 ++++++++----------- 3 files changed, 25 insertions(+), 31 deletions(-) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 6810cf8daaf..467e053a540 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -139,6 +139,7 @@ 1. [A32NX/FMS] Add terminal area database holds for MSFS2024 - @tracernz (Mike) 1. [EFB] Set EFB Auto Brightness to default to On - @MrJigs7 (MrJigs) 1. [FMS] Allow airport to be loaded as fixes in instrument procedures - @tracernz (Mike) +1. [A32NX/FMS] Added nav database swap confirmation - @tracernz (Mike) ## 0.12.0 diff --git a/README.md b/README.md index 42d292bc03d..16cfeadbb99 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ The following aircraft configurations are currently simulated or targeted: Model A320-251N Engine CFM LEAP 1A-26 APU APS3200 - FMS Honeywell Release H3 + FMS Honeywell Release H4 FWC Std. H2F13 RA Honeywell ALA-52B TAWS Honeywell EGPWS @@ -67,7 +67,7 @@ Our [known issues](https://docs.flybywiresim.com/aircraft/support/known-issues/) ### What liveries are available? -Liveries for the A32NX can be found on [Flightsim.to](https://flightsim.to/c/liveries/flybywire-a32nx/). +Liveries for the A32NX can be found on [Flightsim.to](https://flightsim.to/c/liveries/flybywire-a32nx/). Liveries for the A380X can be found on [Flightsim.to](https://flightsim.to/liveries/flybywire-a380x/). diff --git a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_IdentPage.js b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_IdentPage.js index ecebd5aed5a..f19144ca619 100644 --- a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_IdentPage.js +++ b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_IdentPage.js @@ -17,9 +17,6 @@ const DB_MONTHS = Object.freeze({ '12': "DEC" }); -// Honeywell H4+ feature only -const confirmDataBaseSwitch = false; - function calculateActiveDate(dbIdent) { const effDay = dbIdent.effectiveFrom.substring(8); const effMonth = dbIdent.effectiveFrom.substring(5, 7); @@ -29,6 +26,13 @@ function calculateActiveDate(dbIdent) { return `${effDay}${DB_MONTHS[effMonth]}-${expDay}${DB_MONTHS[expMonth]}`; } +function calculatesecondDate(dbIdent) { + const [effYear, effMonth, effDay] = dbIdent.effectiveFrom.split('-'); + const [expYear, expMonth, expDay] = dbIdent.effectiveTo.split('-'); + + return `${effDay}${DB_MONTHS[effMonth]}${effYear}-${expDay}${DB_MONTHS[expMonth]}${expYear}`; +} + async function switchDataBase(mcdu) { await mcdu.switchNavDatabase(); } @@ -96,40 +100,29 @@ class CDUIdentPage { } const dbCycle = mcdu.getNavDatabaseIdent(); - const navCycleDates = dbCycle === null ? '' : calculateActiveDate(dbCycle); + const activeCycleDates = dbCycle === null ? '' : calculateActiveDate(dbCycle); + const secondCycleDates = dbCycle === null ? '' : calculatesecondDate(dbCycle); const navSerial = dbCycle === null ? '' : `${dbCycle.provider.substring(0, 2).toUpperCase()}${dbCycle.airacCycle}0001`; - // H4+ only confirm prompt - if (confirmDataBaseSwitch) { - secondaryDBTopLine = - confirmType === ConfirmType.SwitchDataBase - ? `{amber}{small}\xa0${navCycleDates}{end}` - : "\xa0SECOND\xa0NAV\xa0DATA\xa0BASE"; - secondaryDBSubLine = - confirmType === ConfirmType.SwitchDataBase - ? "{amber}{CANCEL\xa0\xa0\xa0\xa0SWAP\xa0CONFIRM*{end}" - : `{small}{cyan}{${navCycleDates}{end}{end}`; - } else { - secondaryDBTopLine = "\xa0SECOND\xa0NAV\xa0DATA\xa0BASE"; - secondaryDBSubLine = - `{small}{cyan}{${navCycleDates}{end}{end}`; - } + // H4+ only confirm prompt + year on second dates + secondaryDBTopLine = + confirmType === ConfirmType.SwitchDataBase + ? `{amber}{small}\xa0${secondCycleDates}{end}` + : "\xa0SECOND\xa0NAV\xa0DATA\xa0BASE"; + secondaryDBSubLine = + confirmType === ConfirmType.SwitchDataBase + ? "{amber}{CANCEL\xa0\xa0\xa0SWAP\xa0\xa0CONFIRM*{end}" + : `{small}{cyan}{${secondCycleDates}{end}{end}`; mcdu.leftInputDelay[2] = () => { return mcdu.getDelaySwitchPage(); }; mcdu.onLeftInput[2] = () => { - if (confirmDataBaseSwitch) { - if (confirmType === ConfirmType.SwitchDataBase) { - CDUIdentPage.ShowPage(mcdu); - } else { - CDUIdentPage.ShowPage(mcdu, ConfirmType.SwitchDataBase); - } + if (confirmType === ConfirmType.SwitchDataBase) { + CDUIdentPage.ShowPage(mcdu); } else { - switchDataBase(mcdu).then(() => { - CDUIdentPage.ShowPage(mcdu); - }); + CDUIdentPage.ShowPage(mcdu, ConfirmType.SwitchDataBase); } }; @@ -151,7 +144,7 @@ class CDUIdentPage { ["LEAP-1A26[color]green"], ["\xa0ACTIVE NAV DATA BASE"], [ - `{cyan}\xa0${navCycleDates}{end}`, + `{cyan}\xa0${activeCycleDates}{end}`, `{green}${navSerial}{end}`, ], [secondaryDBTopLine], From 0839ced9ce79f78bff4dd6ac3898aa8072a77419 Mon Sep 17 00:00:00 2001 From: Michael Corcoran Date: Sun, 26 Jan 2025 04:18:33 +1300 Subject: [PATCH 2/3] fix(a32nx/fms): ac status page layout --- .../FlyByWire_A320_Neo/CDU/A320_Neo_CDU_IdentPage.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_IdentPage.js b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_IdentPage.js index f19144ca619..cc7c86558f3 100644 --- a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_IdentPage.js +++ b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_IdentPage.js @@ -139,7 +139,7 @@ class CDUIdentPage { }; mcdu.setTemplate([ - ["A320-200"], //This aircraft code is correct and does not include the engine type. + ["A320-200\xa0\xa0\xa0\xa0"], //This aircraft code is correct and does not include the engine type. ["\xa0ENG"], ["LEAP-1A26[color]green"], ["\xa0ACTIVE NAV DATA BASE"], @@ -152,9 +152,9 @@ class CDUIdentPage { ["", storedTitleCell], ["", storedRoutesRunwaysCell], ["CHG CODE", storedWaypointsNavaidsCell], - ["{small}[ ]{end}[color]inop", storedDeleteCell], - ["IDLE/PERF", "SOFTWARE"], - ["+0.0/+0.0[color]green", "STATUS/XLOAD>[color]inop"], + ["[\xa0][color]inop", storedDeleteCell], + ["IDLE/PERF", "SOFTWARE\xa0\xa0"], + ["{small}{green}+0.0/+0.0{end}{end}", "STATUS/XLOAD>[color]inop"], ]); } } From 5f62240478cb77c99e802db8b9d523336fd163fa Mon Sep 17 00:00:00 2001 From: Michael Corcoran Date: Sun, 26 Jan 2025 14:30:50 +1300 Subject: [PATCH 3/3] fix: typo --- .../FlyByWire_A320_Neo/CDU/A320_Neo_CDU_IdentPage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_IdentPage.js b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_IdentPage.js index cc7c86558f3..1f92462e3cb 100644 --- a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_IdentPage.js +++ b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_IdentPage.js @@ -26,7 +26,7 @@ function calculateActiveDate(dbIdent) { return `${effDay}${DB_MONTHS[effMonth]}-${expDay}${DB_MONTHS[expMonth]}`; } -function calculatesecondDate(dbIdent) { +function calculateSecondDate(dbIdent) { const [effYear, effMonth, effDay] = dbIdent.effectiveFrom.split('-'); const [expYear, expMonth, expDay] = dbIdent.effectiveTo.split('-'); @@ -101,7 +101,7 @@ class CDUIdentPage { const dbCycle = mcdu.getNavDatabaseIdent(); const activeCycleDates = dbCycle === null ? '' : calculateActiveDate(dbCycle); - const secondCycleDates = dbCycle === null ? '' : calculatesecondDate(dbCycle); + const secondCycleDates = dbCycle === null ? '' : calculateSecondDate(dbCycle); const navSerial = dbCycle === null ? '' : `${dbCycle.provider.substring(0, 2).toUpperCase()}${dbCycle.airacCycle}0001`; // H4+ only confirm prompt + year on second dates