From 09466ec1211a538797fe08146e2f2dc7a0d2ff5f Mon Sep 17 00:00:00 2001 From: Sascha Rudolf Date: Fri, 19 Nov 2021 15:34:43 +0100 Subject: [PATCH] feat: added setting for steering & rudder separation --- src/instruments/src/EFB/Settings/Settings.tsx | 29 +++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/src/instruments/src/EFB/Settings/Settings.tsx b/src/instruments/src/EFB/Settings/Settings.tsx index a95a338b15d..49392e4ff38 100644 --- a/src/instruments/src/EFB/Settings/Settings.tsx +++ b/src/instruments/src/EFB/Settings/Settings.tsx @@ -17,7 +17,7 @@ type ButtonType = { setting: string, } -type AdirsButton = { +type SimVarButton = { simVarValue: number, } @@ -247,7 +247,10 @@ const SimOptionsPage = () => { const [dynamicRegistration, setDynamicRegistration] = usePersistentProperty('DYNAMIC_REGISTRATION_DECAL', '0'); - const adirsAlignTimeButtons: (ButtonType & AdirsButton)[] = [ + const [realisticTiller, setRealisticTiller] = usePersistentProperty('REALISTIC_TILLER_ENABLED', '0'); + const [, setRealisticTillerSimVar] = useSimVar('L:A32NX_REALISTIC_TILLER_ENABLED', 'Number', 0); + + const adirsAlignTimeButtons: (ButtonType & SimVarButton)[] = [ { name: 'Instant', setting: 'INSTANT', simVarValue: 1 }, { name: 'Fast', setting: 'FAST', simVarValue: 2 }, { name: 'Real', setting: 'REAL', simVarValue: 0 }, @@ -270,6 +273,11 @@ const SimOptionsPage = () => { { name: 'Enabled', setting: '1' }, ]; + const steeringSeparationButtons: (ButtonType & SimVarButton)[] = [ + { name: 'Disabled', setting: '0', simVarValue: 0 }, + { name: 'Enabled', setting: '1', simVarValue: 1 }, + ]; + useEffect(() => { setShowNavbar(!showThrottleSettings); }, [showThrottleSettings]); @@ -368,6 +376,23 @@ const SimOptionsPage = () => { ))} +
+ Separate Tiller from Rudder Inputs + + {steeringSeparationButtons.map((button) => ( + { + setRealisticTiller(button.setting); + setRealisticTillerSimVar(button.simVarValue); + }} + selected={realisticTiller === button.setting} + > + {button.name} + + ))} + +