@@ -24,8 +24,8 @@ _radioId = toLower _radioId;
24
24
// Get the radio's name
25
25
private _name = if (_radioId in ACRE_ACCESSIBLE_RACK_RADIOS || {_radioId in ACRE_HEARABLE_RACK_RADIOS}) then {
26
26
private _radioRack = [_radioId ] call EFUNC(sys_rack,getRackFromRadio);
27
- private _radioClass = [_radioRack ] call EFUNC(sys_rack,getRackBaseClassname);
28
- getText (configFile >> " CfgAcreComponents" >> _radioClass >> " name" )
27
+ private _rackClass = [_radioRack ] call EFUNC(sys_rack,getRackBaseClassname);
28
+ getText (configFile >> " CfgAcreComponents" >> _rackClass >> " name" )
29
29
} else {
30
30
// Include the owner's name for external radios
31
31
private _owner = if (_radioId in ACRE_ACTIVE_EXTERNAL_RADIOS) then {
@@ -38,15 +38,45 @@ private _name = if (_radioId in ACRE_ACCESSIBLE_RACK_RADIOS || {_radioId in ACRE
38
38
};
39
39
40
40
// Display current radio channel
41
- private _maxChannels = [_radioId , " getState " , " channels " ] call EFUNC(sys_data,dataEvent );
41
+ private _radioClass = [_radioId ] call EFUNC(sys_radio,getRadioBaseClassname );
42
42
43
- private _text = if (isNil " _maxChannels" ) then {
44
- // Display frequency for single-channel radios (e.g. AN/PRC-77)
45
- private _txData = [_radioId , " getCurrentChannelData" ] call EFUNC(sys_data,dataEvent);
46
- private _currentFreq = HASH_GET(_txData ," frequencyTX" );
47
- format [" %1 %2 MHz" , _name , _currentFreq ];
48
- } else {
49
- format [LELSTRING(ace_interact,channelShort), _name , _radioId call EFUNC(api,getRadioChannel)]
43
+ private _text = switch (_radioClass ) do {
44
+ case " ACRE_PRC77" : {
45
+ // Display frequency for single-channel radios (e.g. AN/PRC-77)
46
+ private _txData = [_radioId , " getCurrentChannelData" ] call EFUNC(sys_data,dataEvent);
47
+ private _currentFreq = HASH_GET(_txData ," frequencyTX" );
48
+ format [" %1 %2 MHz" , _name , [_currentFreq , 1 , 2 ] call CBA_fnc_formatNumber ]
49
+ };
50
+ case " ACRE_PRC343" : {
51
+ private _channelRaw = [_radioId , " getCurrentChannel" ] call EFUNC(sys_data,dataEvent);
52
+ private _block = floor (_channelRaw / 16 ) + 1 ;
53
+ private _channel = (_channelRaw % 16 ) + 1 ;
54
+ format [LELSTRING(ace_interact,channelBlockShort), _name , _block , _channel ]
55
+ };
56
+ case " ACRE_SEM52SL" : {
57
+ private _channel = _radioId call EFUNC(api,getRadioChannel);
58
+ _channel = switch (_channel ) do {
59
+ case 13 : { " H" };
60
+ case 14 : { " P" };
61
+ default { _channel };
62
+ };
63
+ format [LELSTRING(ace_interact,channelShort), _name , _channel ]
64
+ };
65
+ case " ACRE_SEM70" : {
66
+ private _hashData = [_radioId , " getCurrentChannelData" ] call EFUNC(sys_data,dataEvent);
67
+ private _description = if (HASH_GET(_hashData ," mode" ) == " singleChannel" ) then {
68
+ // HW (Manual Channel) Mode
69
+ format [" %1 MHz" , [HASH_GET(_hashData ," frequencyTX" ), 1 , 3 ] call CBA_fnc_formatNumber ]
70
+ } else {
71
+ // AKW (Automatic Channel) Mode
72
+ private _channelNumber = [_radioId , " getCurrentChannel" ] call EFUNC(sys_data,dataEvent);
73
+ format [LELSTRING(ace_interact,channelNetIDShort), (_channelNumber ), HASH_GET(_hashData ," networkID" )]
74
+ };
75
+ format [" %1 %2" , _name , _description ]
76
+ };
77
+ default {
78
+ format [LELSTRING(ace_interact,channelShort), _name , _radioId call EFUNC(api,getRadioChannel)]
79
+ };
50
80
};
51
81
52
82
// Display radio keys in front of those which are bound
0 commit comments