diff --git a/Scripts/DCS-BIOS/doc/Addresses.h b/Scripts/DCS-BIOS/doc/Addresses.h index b3564d20f..f7930296d 100644 --- a/Scripts/DCS-BIOS/doc/Addresses.h +++ b/Scripts/DCS-BIOS/doc/Addresses.h @@ -28222,8 +28222,8 @@ #define SA342_LANDING_LIGHT_EXTEND_AM 0x581A, 0x0800 #define SA342_LANDING_LIGHT_RETRACT 0x581A, 0x1000, 12 #define SA342_LANDING_LIGHT_RETRACT_AM 0x581A, 0x1000 -#define SA342_LASER_POWER 0x582E, 0x0004, 2 -#define SA342_LASER_POWER_AM 0x582E, 0x0004 +#define SA342_LASER_POWER 0x5920, 0x0400, 10 +#define SA342_LASER_POWER_AM 0x5920, 0x0400 #define SA342_LASING_BUTTON 0x582C, 0x0001, 0 #define SA342_LASING_BUTTON_AM 0x582C, 0x0001 #define SA342_LASING_BUTTON_COVER 0x581A, 0x8000, 15 @@ -28499,6 +28499,8 @@ #define SA342_UV_LIGHTING_A 0x5824 #define SA342_VARIOMETER_VVI 0x58E0, 0xFFFF, 0 #define SA342_VARIOMETER_VVI_A 0x58E0 +#define SA342_VCB_POWER 0x582E, 0x0004, 2 +#define SA342_VCB_POWER_AM 0x582E, 0x0004 #define SA342_VHF_AM_RADIO_VOLUME_1 0x5804, 0xFFFF, 0 #define SA342_VHF_AM_RADIO_VOLUME_1_A 0x5804 #define SA342_VHF_AM_RADIO_VOLUME_2 0x580A, 0xFFFF, 0 diff --git a/Scripts/DCS-BIOS/doc/doc_assets/SA342.jsonp b/Scripts/DCS-BIOS/doc/doc_assets/SA342.jsonp index 061521f31..a1817de9a 100644 --- a/Scripts/DCS-BIOS/doc/doc_assets/SA342.jsonp +++ b/Scripts/DCS-BIOS/doc/doc_assets/SA342.jsonp @@ -6090,7 +6090,7 @@ docdata["SA342"] = "LASER_POWER": { "category": "PE", "control_type": "selector", - "description": "Laser Power", + "description": "Deprecated - use VCB_POWER instead", "identifier": "LASER_POWER", "inputs": [ { "description": "switch to previous or next state", @@ -6106,13 +6106,13 @@ docdata["SA342"] = } ], "momentary_positions": "none", "outputs": [ { - "address": 22574, + "address": 22816, "address_mask_identifier": "SA342_LASER_POWER_AM", "address_mask_shift_identifier": "SA342_LASER_POWER", "description": "selector position", - "mask": 4, + "mask": 1024, "max_value": 1, - "shift_by": 2, + "shift_by": 10, "suffix": "", "type": "integer" } ], @@ -6215,19 +6215,19 @@ docdata["SA342"] = }, "MISSILE_LAUNCH_COVER": { "category": "PE", - "control_type": "selector", + "control_type": "action", "description": "Missile Launch Cover", "identifier": "MISSILE_LAUNCH_COVER", "inputs": [ { "description": "switch to previous or next state", "interface": "fixed_step" }, { - "description": "set position", + "description": "set the switch position -- 0 = off, 1 = on", "interface": "set_state", "max_value": 1 }, { "argument": "TOGGLE", - "description": "Toggle switch state", + "description": "toggle switch state", "interface": "action" } ], "momentary_positions": "none", @@ -6306,6 +6306,37 @@ docdata["SA342"] = "type": "integer" } ], "physical_variant": "push_button" + }, + "VCB_POWER": { + "category": "PE", + "control_type": "selector", + "description": "VCB Power Selector", + "identifier": "VCB_POWER", + "inputs": [ { + "description": "switch to previous or next state", + "interface": "fixed_step" + }, { + "description": "set position", + "interface": "set_state", + "max_value": 1 + }, { + "argument": "TOGGLE", + "description": "Toggle switch state", + "interface": "action" + } ], + "momentary_positions": "none", + "outputs": [ { + "address": 22574, + "address_mask_identifier": "SA342_VCB_POWER_AM", + "address_mask_shift_identifier": "SA342_VCB_POWER", + "description": "selector position", + "mask": 4, + "max_value": 1, + "shift_by": 2, + "suffix": "", + "type": "integer" + } ], + "physical_variant": "toggle_switch" } }, "RWR": { diff --git a/Scripts/DCS-BIOS/doc/json/SA342.json b/Scripts/DCS-BIOS/doc/json/SA342.json index 576c78ab1..a7f48786c 100644 --- a/Scripts/DCS-BIOS/doc/json/SA342.json +++ b/Scripts/DCS-BIOS/doc/json/SA342.json @@ -6089,7 +6089,7 @@ "LASER_POWER": { "category": "PE", "control_type": "selector", - "description": "Laser Power", + "description": "Deprecated - use VCB_POWER instead", "identifier": "LASER_POWER", "inputs": [ { "description": "switch to previous or next state", @@ -6105,13 +6105,13 @@ } ], "momentary_positions": "none", "outputs": [ { - "address": 22574, + "address": 22816, "address_mask_identifier": "SA342_LASER_POWER_AM", "address_mask_shift_identifier": "SA342_LASER_POWER", "description": "selector position", - "mask": 4, + "mask": 1024, "max_value": 1, - "shift_by": 2, + "shift_by": 10, "suffix": "", "type": "integer" } ], @@ -6214,19 +6214,19 @@ }, "MISSILE_LAUNCH_COVER": { "category": "PE", - "control_type": "selector", + "control_type": "action", "description": "Missile Launch Cover", "identifier": "MISSILE_LAUNCH_COVER", "inputs": [ { "description": "switch to previous or next state", "interface": "fixed_step" }, { - "description": "set position", + "description": "set the switch position -- 0 = off, 1 = on", "interface": "set_state", "max_value": 1 }, { "argument": "TOGGLE", - "description": "Toggle switch state", + "description": "toggle switch state", "interface": "action" } ], "momentary_positions": "none", @@ -6305,6 +6305,37 @@ "type": "integer" } ], "physical_variant": "push_button" + }, + "VCB_POWER": { + "category": "PE", + "control_type": "selector", + "description": "VCB Power Selector", + "identifier": "VCB_POWER", + "inputs": [ { + "description": "switch to previous or next state", + "interface": "fixed_step" + }, { + "description": "set position", + "interface": "set_state", + "max_value": 1 + }, { + "argument": "TOGGLE", + "description": "Toggle switch state", + "interface": "action" + } ], + "momentary_positions": "none", + "outputs": [ { + "address": 22574, + "address_mask_identifier": "SA342_VCB_POWER_AM", + "address_mask_shift_identifier": "SA342_VCB_POWER", + "description": "selector position", + "mask": 4, + "max_value": 1, + "shift_by": 2, + "suffix": "", + "type": "integer" + } ], + "physical_variant": "toggle_switch" } }, "RWR": { diff --git a/Scripts/DCS-BIOS/lib/modules/aircraft_modules/SA342.lua b/Scripts/DCS-BIOS/lib/modules/aircraft_modules/SA342.lua index 1c545934f..0a654716a 100644 --- a/Scripts/DCS-BIOS/lib/modules/aircraft_modules/SA342.lua +++ b/Scripts/DCS-BIOS/lib/modules/aircraft_modules/SA342.lua @@ -101,7 +101,7 @@ SA342:definePotentiometer("FORMATION_INTENSITY", 14, 3012, 230, { 0, 1 }, "Navli --PE SA342:defineToggleSwitch("LASING_BUTTON_COVER", 36, 3301, 255, "PE", "Lasing Button Cover") SA342:definePushButton("LASING_BUTTON", 36, 3302, 256, "PE", "Lasing Button") -SA342:defineToggleSwitch("MISSILE_LAUNCH_COVER", 36, 3303, 257, "PE", "Missile Launch Cover") +SA342:defineToggleSwitchToggleOnly("MISSILE_LAUNCH_COVER", 36, 3303, 257, "PE", "Missile Launch Cover") SA342:definePushButton("MISSILE_LAUNCH", 36, 3304, 258, "PE", "Missile Launch") SA342:definePushButton("INVERSED_SYMBOLOGY", 36, 3305, 259, "PE", "Inversed Symbology") SA342:definePushButton("INVERSED_IMAGE", 36, 3306, 260, "PE", "Inversed Image") @@ -117,7 +117,7 @@ SA342:definePushButton("TOGGLE_VDO_VTH", 36, 3282, 364, "PE", "Toggle VDO/VTH") SA342:defineTumb("CAMERA_ZOOM_IN", 36, 3284, 365, 1, { -1, 0 }, nil, false, "PE", "Camera Zoom In") SA342:defineToggleSwitch("CAMERA_ZOOM_OUT", 36, 3283, 365, "PE", "Camera Zoom Out") SA342:defineTumb("CTH_POWER", 36, 3285, 366, 0.5, { 0, 1 }, nil, false, "PE", "CTH Power") -SA342:defineToggleSwitch("LASER_POWER", 36, 3286, 367, "PE", "Laser Power") +SA342:defineToggleSwitch("VCB_POWER", 36, 3286, 367, "PE", "VCB Power Selector") SA342:defineTumb("CAMERA_MODE", 36, 3287, 370, 0.25, { 0, 1 }, nil, false, "PE", "Camera Mode") --Torque @@ -553,4 +553,6 @@ SA342:defineReadWriteRadio("AM_RADIO", 5, 7, 3, 1000, "AM Radio") SA342:defineReadWriteRadio("FM_RADIO", 27, 7, 3, 1000, "FM Radio") SA342:defineReadWriteRadio("UHF_RADIO", 30, 7, 3, 1000, "UHF Radio") +SA342:defineToggleSwitch("LASER_POWER", 36, 3286, 367, "PE", "Deprecated - use VCB_POWER instead") + return SA342