From 41a52c87fbb127d3b1bee488d16951006a1550b1 Mon Sep 17 00:00:00 2001 From: Jerker Dahlblom Date: Sat, 14 Oct 2023 15:22:44 +0300 Subject: [PATCH] SpitfireLFMkIX Radio control added --- Scripts/DCS-BIOS/doc/Addresses.h | 1 + Scripts/DCS-BIOS/doc/json/SpitfireLFMkIX.json | 22 +++++++++++++++++++ .../DCS-BIOS/doc/json/SpitfireLFMkIX.jsonp | 22 +++++++++++++++++++ .../aircraft_modules/SpitfireLFMkIX.lua | 2 ++ 4 files changed, 47 insertions(+) diff --git a/Scripts/DCS-BIOS/doc/Addresses.h b/Scripts/DCS-BIOS/doc/Addresses.h index 0a2a2b30d..517f9f898 100644 --- a/Scripts/DCS-BIOS/doc/Addresses.h +++ b/Scripts/DCS-BIOS/doc/Addresses.h @@ -28376,6 +28376,7 @@ #define SpitfireLFMkIX_UC_EMER_AM 0x5420, 0x0020 #define SpitfireLFMkIX_VARIOMETERGAUGE 0x543C, 0xFFFF, 0 #define SpitfireLFMkIX_VARIOMETERGAUGE_A 0x543C +#define SpitfireLFMkIX_VHF_RADIO_A 0x546A #define SpitfireLFMkIX_VOLTMETERGAUGE 0x544C, 0xFFFF, 0 #define SpitfireLFMkIX_VOLTMETERGAUGE_A 0x544C #define SpitfireLFMkIX_WHEEL_BRAKES 0x5402, 0xFFFF, 0 diff --git a/Scripts/DCS-BIOS/doc/json/SpitfireLFMkIX.json b/Scripts/DCS-BIOS/doc/json/SpitfireLFMkIX.json index 3a76c7b1b..326a926bf 100644 --- a/Scripts/DCS-BIOS/doc/json/SpitfireLFMkIX.json +++ b/Scripts/DCS-BIOS/doc/json/SpitfireLFMkIX.json @@ -2615,6 +2615,28 @@ } ] } }, + "Radio Frequencies": { + "VHF_RADIO": { + "category": "Radio Frequencies", + "control_type": "radio", + "description": "VHF RADIO", + "identifier": "VHF_RADIO", + "inputs": [ { + "description": "The frequency to set, with or without a decimal place", + "interface": "set_string" + } ], + "outputs": [ { + "address": 21610, + "address_identifier": "SpitfireLFMkIX_VHF_RADIO_A", + "address_mask_identifier": "SpitfireLFMkIX_VHF_RADIO_AM", + "address_mask_shift_identifier": "SpitfireLFMkIX_VHF_RADIO", + "description": "The current frequency the radio is set to", + "max_length": 7, + "suffix": "", + "type": "string" + } ] + } + }, "Radio Lights": { "RADIO_A_LIGHT": { "category": "Radio Lights", diff --git a/Scripts/DCS-BIOS/doc/json/SpitfireLFMkIX.jsonp b/Scripts/DCS-BIOS/doc/json/SpitfireLFMkIX.jsonp index c647b5225..ac6f45e5d 100644 --- a/Scripts/DCS-BIOS/doc/json/SpitfireLFMkIX.jsonp +++ b/Scripts/DCS-BIOS/doc/json/SpitfireLFMkIX.jsonp @@ -2616,6 +2616,28 @@ docdata["SpitfireLFMkIX"] = } ] } }, + "Radio Frequencies": { + "VHF_RADIO": { + "category": "Radio Frequencies", + "control_type": "radio", + "description": "VHF RADIO", + "identifier": "VHF_RADIO", + "inputs": [ { + "description": "The frequency to set, with or without a decimal place", + "interface": "set_string" + } ], + "outputs": [ { + "address": 21610, + "address_identifier": "SpitfireLFMkIX_VHF_RADIO_A", + "address_mask_identifier": "SpitfireLFMkIX_VHF_RADIO_AM", + "address_mask_shift_identifier": "SpitfireLFMkIX_VHF_RADIO", + "description": "The current frequency the radio is set to", + "max_length": 7, + "suffix": "", + "type": "string" + } ] + } + }, "Radio Lights": { "RADIO_A_LIGHT": { "category": "Radio Lights", diff --git a/Scripts/DCS-BIOS/lib/modules/aircraft_modules/SpitfireLFMkIX.lua b/Scripts/DCS-BIOS/lib/modules/aircraft_modules/SpitfireLFMkIX.lua index 3201d7103..b6eb1fdf7 100644 --- a/Scripts/DCS-BIOS/lib/modules/aircraft_modules/SpitfireLFMkIX.lua +++ b/Scripts/DCS-BIOS/lib/modules/aircraft_modules/SpitfireLFMkIX.lua @@ -167,4 +167,6 @@ SpitfireLFMkIX:defineIndicatorLight("RADIO_C_LIGHT", 122, "Radio Lights", "Radio SpitfireLFMkIX:defineIndicatorLight("RADIO_D_LIGHT", 123, "Radio Lights", "Radio D Light (white)") SpitfireLFMkIX:defineIndicatorLight("RADIO_TX_LIGHT", 124, "Radio Lights", "Radio TX Light (white)") +SpitfireLFMkIX:defineReadWriteRadio("VHF_RADIO", 15, 7, 3, 1000, "VHF RADIO") + return SpitfireLFMkIX