From ad831b52722c0bceb8be1f26371db775270ee601 Mon Sep 17 00:00:00 2001 From: Julian Sebline Date: Wed, 15 Jun 2022 00:00:18 +0200 Subject: [PATCH] ILS/MLS volume knobs + fix --- .../A32NX/AirlinerCommon.xml | 43 ++++++++++++++++--- .../src/RMP/Components/RadioPanelDisplay.tsx | 4 +- 2 files changed, 39 insertions(+), 8 deletions(-) diff --git a/flybywire-aircraft-a320-neo/ModelBehaviorDefs/A32NX/AirlinerCommon.xml b/flybywire-aircraft-a320-neo/ModelBehaviorDefs/A32NX/AirlinerCommon.xml index 0e8cbe3390b..9822ce7cd4c 100644 --- a/flybywire-aircraft-a320-neo/ModelBehaviorDefs/A32NX/AirlinerCommon.xml +++ b/flybywire-aircraft-a320-neo/ModelBehaviorDefs/A32NX/AirlinerCommon.xml @@ -413,9 +413,11 @@ (L:XMLVAR_NAV_VOICE_Switch_Down) 0 == if{ (L:XMLVAR_NAV_L_VOR1_Switch_Down) (L:XMLVAR_NAV_R_VOR1_Switch_Down) or if{ 1 (>K:RADIO_VOR1_IDENT_ENABLE) + 1 (>K:RADIO_DME1_IDENT_ENABLE) } (L:XMLVAR_NAV_L_VOR2_Switch_Down) (L:XMLVAR_NAV_R_VOR2_Switch_Down) or if{ 1 (>K:RADIO_VOR2_IDENT_ENABLE) + 1 (>K:RADIO_DME2_IDENT_ENABLE) } (L:XMLVAR_NAV_L_ADF1_Switch_Down) (L:XMLVAR_NAV_R_ADF1_Switch_Down) or if{ @@ -431,6 +433,9 @@ 1 (>K:RADIO_VOR2_IDENT_DISABLE) 1 (>K:RADIO_ADF_IDENT_DISABLE) 1 (>K:RADIO_ADF2_IDENT_DISABLE) + + 1 (>K:RADIO_DME1_IDENT_DISABLE) + 1 (>K:RADIO_DME2_IDENT_DISABLE) } fcubutton @@ -457,13 +462,19 @@ (L:XMLVAR_NAV_VOICE_Switch_Down) 0 == if{ (A:NAV SOUND:1, Bool) 1 == (L:XMLVAR_NAV_L_VOR1_Switch_Down) 0 == (L:XMLVAR_NAV_R_VOR1_Switch_Down) 0 == and and if{ 1 (>K:RADIO_VOR1_IDENT_TOGGLE) + 1 (>K:RADIO_DME1_IDENT_SET) } (A:NAV SOUND:1, Bool) 0 == (L:XMLVAR_NAV_L_VOR1_Switch_Down) 1 == (L:XMLVAR_NAV_R_VOR1_Switch_Down) 1 == or and if{ 1 (>K:RADIO_VOR1_IDENT_TOGGLE) + 1 (>K:RADIO_DME1_IDENT_SET) } } + (A:NAV VOLUME:1, percent) (>K:NAV1_VOLUME_INC) (>K:NAV1_VOLUME_DEC) @@ -486,13 +497,19 @@ (L:XMLVAR_NAV_VOICE_Switch_Down) 0 == if{ (A:NAV SOUND:2, Bool) 1 == (L:XMLVAR_NAV_L_VOR2_Switch_Down) 0 == (L:XMLVAR_NAV_R_VOR2_Switch_Down) 0 == and and if{ 1 (>K:RADIO_VOR2_IDENT_TOGGLE) + 1 (>K:RADIO_DME2_IDENT_SET) } (A:NAV SOUND:2, Bool) 0 == (L:XMLVAR_NAV_L_VOR2_Switch_Down) 1 == (L:XMLVAR_NAV_R_VOR2_Switch_Down) 1 == or and if{ 1 (>K:RADIO_VOR2_IDENT_TOGGLE) + 1 (>K:RADIO_DME2_IDENT_SET) } } + (A:NAV VOLUME:2, percent) (>K:NAV2_VOLUME_INC) (>K:NAV2_VOLUME_DEC) @@ -530,7 +547,7 @@ TT:COCKPIT.TOOLTIPS.TRANSMITTER_SELECT_VHF_R - + + (L:XMLVAR_NAV_#SIDE#_ILS_Volume) 100 * + (L:XMLVAR_NAV_#SIDE#_ILS_Volume) #VOLUME_INCREMENT# + 1 min (>L:XMLVAR_NAV_#SIDE#_ILS_Volume) + (L:XMLVAR_NAV_#SIDE#_ILS_Volume) #VOLUME_INCREMENT# - 0 max (>L:XMLVAR_NAV_#SIDE#_ILS_Volume) TT:COCKPIT.TOOLTIPS.TRANSMITTER_VHF_R_VOLUME_DEC TT:COCKPIT.TOOLTIPS.TRANSMITTER_VHF_R_VOLUME_INC TT:COCKPIT.TOOLTIPS.TRANSMITTER_VHF_R_AUDIO_TOGGLE @@ -555,12 +577,17 @@ #ANIM_NAME_PUSH_RECEIVER_MLS# #NODE_ID_LED_RECEIVER_MLS# MLS - + + + + (L:XMLVAR_NAV_#SIDE#_MLS_Volume) 100 * + (L:XMLVAR_NAV_#SIDE#_MLS_Volume) #VOLUME_INCREMENT# + 1 min (>L:XMLVAR_NAV_#SIDE#_MLS_Volume) + (L:XMLVAR_NAV_#SIDE#_MLS_Volume) #VOLUME_INCREMENT# - 0 max (>L:XMLVAR_NAV_#SIDE#_MLS_Volume) TT:COCKPIT.TOOLTIPS.TRANSMITTER_VHF_R_VOLUME_DEC TT:COCKPIT.TOOLTIPS.TRANSMITTER_VHF_R_VOLUME_INC TT:COCKPIT.TOOLTIPS.TRANSMITTER_VHF_R_AUDIO_TOGGLE TT:COCKPIT.TOOLTIPS.TRANSMITTER_SELECT_VHF_R - --> + KNOB @@ -583,6 +610,10 @@ } } + (A:ADF VOLUME:1, percent) (>K:ADF_VOLUME_INC) (>K:ADF_VOLUME_DEC) @@ -613,7 +644,7 @@ } } - + (L:XMLVAR_NAV_#SIDE#_ADF2_Volume) 100 * (L:XMLVAR_NAV_#SIDE#_ADF2_Volume) #VOLUME_INCREMENT# + 1 min (>L:XMLVAR_NAV_#SIDE#_ADF2_Volume) (L:XMLVAR_NAV_#SIDE#_ADF2_Volume) #VOLUME_INCREMENT# - 0 max (>L:XMLVAR_NAV_#SIDE#_ADF2_Volume) @@ -780,7 +811,7 @@ #FROM_VOLUME# #INC_VOLUME# #DEC_VOLUME# - (L:XMLVAR_NAV_#SIDE#_#INSTRUMENT#_Switch_Down) + (L:XMLVAR_NAV_#SIDE#_#INSTRUMENT#_Switch_Down) 100 * #ANIM_NAME_SWITCH# (L:XMLVAR_NAV_#SIDE#_#INSTRUMENT#_Switch_Down) ! (>L:XMLVAR_NAV_#SIDE#_#INSTRUMENT#_Switch_Down) diff --git a/src/instruments/src/RMP/Components/RadioPanelDisplay.tsx b/src/instruments/src/RMP/Components/RadioPanelDisplay.tsx index 4fc8d0ad3b2..e44f5be801a 100644 --- a/src/instruments/src/RMP/Components/RadioPanelDisplay.tsx +++ b/src/instruments/src/RMP/Components/RadioPanelDisplay.tsx @@ -16,8 +16,8 @@ const TEXT_DATA_MODE_VHF3 = 'DATA'; * @returns The formated frequency string in 123.456 */ const formatFrequency = (frequency: number): string => { - // VHF, VOR, ILS - if (frequency > 108000000) { + // VHF COM, VOR, ILS + if (frequency >= 108000000) { return (frequency / 1000000).toFixed(3).padEnd(7, '0'); }