Skip to content

Commit

Permalink
C-101 radio controls added (#410)
Browse files Browse the repository at this point in the history
COMM radio graphics do not update but the API reports that the new frequency is in use.
  • Loading branch information
jdahlblom authored Oct 15, 2023
1 parent 2cdd76d commit 0d88357
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Scripts/DCS-BIOS/doc/Addresses.h
Original file line number Diff line number Diff line change
Expand Up @@ -6197,6 +6197,7 @@
#define C_101_CC_FRONT_WP_SIGHT_CAM_AM 0x3708, 0x0001
#define C_101_CC_FRONT_WP_UHF_RACAL 0x3708, 0x0002, 1
#define C_101_CC_FRONT_WP_UHF_RACAL_AM 0x3708, 0x0002
#define C_101_COMM_RADIO_A 0x376A
#define C_101_EB_BACK_ADJ_ADI_PITCH 0x3758, 0xFFFF, 0
#define C_101_EB_BACK_ADJ_ADI_PITCH_A 0x3758
#define C_101_EB_BACK_ADJ_RED_LIGHT 0x3754, 0xFFFF, 0
Expand Down Expand Up @@ -6763,6 +6764,7 @@
#define C_101_FRONT_UHF_TEST_SW 0x373C, 0x0006, 1
#define C_101_FRONT_VHF_PRIO 0x366A, 0x0080, 7
#define C_101_FRONT_VHF_PRIO_AM 0x366A, 0x0080
#define C_101_VUHF_RADIO_A 0x3772
#define Christen_Eagle_II_ACCEL_CURR 0x281A, 0xFFFF, 0
#define Christen_Eagle_II_ACCEL_CURR_A 0x281A
#define Christen_Eagle_II_ACCEL_MAX 0x281C, 0xFFFF, 0
Expand Down
42 changes: 42 additions & 0 deletions Scripts/DCS-BIOS/doc/json/C-101.json
Original file line number Diff line number Diff line change
Expand Up @@ -14288,6 +14288,48 @@
"physical_variant": "toggle_switch"
}
},
"Radio Frequencies": {
"COMM_RADIO": {
"category": "Radio Frequencies",
"control_type": "radio",
"description": "COMM RADIO",
"identifier": "COMM_RADIO",
"inputs": [ {
"description": "The frequency to set, with or without a decimal place",
"interface": "set_string"
} ],
"outputs": [ {
"address": 14186,
"address_identifier": "C_101_COMM_RADIO_A",
"address_mask_identifier": "C_101_COMM_RADIO_AM",
"address_mask_shift_identifier": "C_101_COMM_RADIO",
"description": "The current frequency the radio is set to",
"max_length": 7,
"suffix": "",
"type": "string"
} ]
},
"VUHF_RADIO": {
"category": "Radio Frequencies",
"control_type": "radio",
"description": "VUHF RADIO",
"identifier": "VUHF_RADIO",
"inputs": [ {
"description": "The frequency to set, with or without a decimal place",
"interface": "set_string"
} ],
"outputs": [ {
"address": 14194,
"address_identifier": "C_101_VUHF_RADIO_A",
"address_mask_identifier": "C_101_VUHF_RADIO_AM",
"address_mask_shift_identifier": "C_101_VUHF_RADIO",
"description": "The current frequency the radio is set to",
"max_length": 7,
"suffix": "",
"type": "string"
} ]
}
},
"Red Panel Lights": {
"BACK_RED_FLOODLIGHT_L_CENTER": {
"category": "Red Panel Lights",
Expand Down
42 changes: 42 additions & 0 deletions Scripts/DCS-BIOS/doc/json/C-101.jsonp
Original file line number Diff line number Diff line change
Expand Up @@ -14289,6 +14289,48 @@ docdata["C-101"] =
"physical_variant": "toggle_switch"
}
},
"Radio Frequencies": {
"COMM_RADIO": {
"category": "Radio Frequencies",
"control_type": "radio",
"description": "COMM RADIO",
"identifier": "COMM_RADIO",
"inputs": [ {
"description": "The frequency to set, with or without a decimal place",
"interface": "set_string"
} ],
"outputs": [ {
"address": 14186,
"address_identifier": "C_101_COMM_RADIO_A",
"address_mask_identifier": "C_101_COMM_RADIO_AM",
"address_mask_shift_identifier": "C_101_COMM_RADIO",
"description": "The current frequency the radio is set to",
"max_length": 7,
"suffix": "",
"type": "string"
} ]
},
"VUHF_RADIO": {
"category": "Radio Frequencies",
"control_type": "radio",
"description": "VUHF RADIO",
"identifier": "VUHF_RADIO",
"inputs": [ {
"description": "The frequency to set, with or without a decimal place",
"interface": "set_string"
} ],
"outputs": [ {
"address": 14194,
"address_identifier": "C_101_VUHF_RADIO_A",
"address_mask_identifier": "C_101_VUHF_RADIO_AM",
"address_mask_shift_identifier": "C_101_VUHF_RADIO",
"description": "The current frequency the radio is set to",
"max_length": 7,
"suffix": "",
"type": "string"
} ]
}
},
"Red Panel Lights": {
"BACK_RED_FLOODLIGHT_L_CENTER": {
"category": "Red Panel Lights",
Expand Down
3 changes: 3 additions & 0 deletions Scripts/DCS-BIOS/lib/modules/aircraft_modules/C-101.lua
Original file line number Diff line number Diff line change
Expand Up @@ -843,4 +843,7 @@ C_101:defineIndicatorLight("CC_FRONT_BAT_OFF_R_L", 177, "Warning, Caution and In
--178 ff
C_101:definePotentiometer("FRONT_MIRROR_ADJ", 1, 3242, 10, { 0, 1 }, "Misc", "FRONT Adjust Mirror")

C_101:defineReadWriteRadio("COMM_RADIO", 10, 7, 3, 1000, "COMM RADIO")
C_101:defineReadWriteRadio("VUHF_RADIO", 11, 7, 3, 1000, "VUHF RADIO")

return C_101

0 comments on commit 0d88357

Please sign in to comment.