diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index d0fdbc2fa3b..a3492ed630b 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -10,8 +10,9 @@ 1. [GENERAL] Fixed issue in C++ WASM Framework that caused performance degradation in some WASM modules - @frankkopp (Frank Kopp) 1. [A32NX/FCU] Fixed auto-initialisation of baro unit - @tracernz (Mike) 1. [A380X/FCU] Fix baro-preselect not recognising baro unit changes - @tracernz (Mike) -1. [A380X/EFB] Fixed doors automatically opening in flight - @saschl (saschl#9432) +1. [A380X/EFB] Fixed doors automatically opening in flight - @saschl (saschl) 1. [A380X/FMS] Fixed layouting issue on FMS/ACTIVE/PERF/T.O page for some users - @flogross89 (floridude) +1. [A380X/TELEX] Added popup for telex consent @saschl (saschl) @Maximilian-Reuter (\_chaoz) ## 0.12.0 diff --git a/fbw-a380x/src/systems/extras-host/index.ts b/fbw-a380x/src/systems/extras-host/index.ts index b64b69a02ce..2770141d6d2 100644 --- a/fbw-a380x/src/systems/extras-host/index.ts +++ b/fbw-a380x/src/systems/extras-host/index.ts @@ -8,6 +8,7 @@ import { PushbuttonCheck } from 'extras-host/modules/pushbutton_check/Pushbutton import { KeyInterceptor } from './modules/key_interceptor/KeyInterceptor'; import { VersionCheck } from './modules/version_check/VersionCheck'; import { AircraftSync } from 'extras-host/modules/aircraft_sync/AircraftSync'; +import { TelexCheck } from 'extras-host/modules/telex_check/TelexCheck'; /** * This is the main class for the extras-host instrument. @@ -58,6 +59,8 @@ class ExtrasHost extends BaseInstrument { private readonly pilotSeatManager = new PilotSeatManager(ExtrasHost.flightDeckBounds); + private readonly telexCheck = new TelexCheck(); + /** * "mainmenu" = 0 * "loading" = 1 @@ -122,6 +125,7 @@ class ExtrasHost extends BaseInstrument { this.keyInterceptor.startPublish(); this.simVarPublisher.startPublish(); this.aircraftSync.startPublish(); + this.telexCheck.showPopup(); // Signal that the aircraft is ready via L:A32NX_IS_READY SimVar.SetSimVarValue('L:A32NX_IS_READY', 'number', 1); diff --git a/fbw-a380x/src/systems/extras-host/modules/telex_check/TelexCheck.ts b/fbw-a380x/src/systems/extras-host/modules/telex_check/TelexCheck.ts new file mode 100644 index 00000000000..bf695f13807 --- /dev/null +++ b/fbw-a380x/src/systems/extras-host/modules/telex_check/TelexCheck.ts @@ -0,0 +1,24 @@ +// If the consent is not set, show telex page + +// Copyright (c) 2024 FlyByWire Simulations +// SPDX-License-Identifier: GPL-3.0 + +import { NXDataStore, PopUpDialog } from '@flybywiresim/fbw-sdk'; + +export class TelexCheck { + public showPopup(): void { + const telexPopupState = NXDataStore.get('TELEX_POPUP_SHOWN', 'false'); + const popup = new PopUpDialog(); + + if (telexPopupState === 'false') { + popup.showPopUp( + 'TELEX CONFIGURATION', + 'You have not yet configured the telex option. Telex enables free text and live map. If enabled, aircraft position data is published for the duration of the flight. Messages are public and not moderated. USE AT YOUR OWN RISK. To learn more about telex and the features it enables, please go to https://docs.flybywiresim.com/telex. Would you like to enable telex?', + 'small', + () => NXDataStore.set('CONFIG_ONLINE_FEATURES_STATUS', 'ENABLED'), + () => NXDataStore.set('CONFIG_ONLINE_FEATURES_STATUS', 'DISABLED'), + ); + NXDataStore.set('TELEX_POPUP_SHOWN', 'true'); + } + } +}