diff --git a/addons/api/fnc_getRadioChannel.sqf b/addons/api/fnc_getRadioChannel.sqf index c82ae95ba..fa484beed 100644 --- a/addons/api/fnc_getRadioChannel.sqf +++ b/addons/api/fnc_getRadioChannel.sqf @@ -24,4 +24,9 @@ if !(_radioId isEqualType "") exitWith { -1 }; private _channelNumber = [_radioId, "getCurrentChannel"] call EFUNC(sys_data,dataEvent); if (isNil "_channelNumber") exitWith { -1 }; + +private _radioType = [_radioId] call EFUNC(sys_radio,getRadioBaseClassname); + +if (_radioType == "ACRE_PRC77") exitWith { _channelNumber }; + _channelNumber + 1 diff --git a/addons/api/fnc_setRadioChannel.sqf b/addons/api/fnc_setRadioChannel.sqf index b39ef60fe..6a8229b84 100644 --- a/addons/api/fnc_setRadioChannel.sqf +++ b/addons/api/fnc_setRadioChannel.sqf @@ -26,7 +26,7 @@ if !(_radioId isEqualType "") exitWith { false }; if (_channelNumber isEqualType 0) then { private _eventData = _channelNumber - 1; if (([_radioId] call FUNC(getBaseRadio)) == "ACRE_PRC77") then { - _eventData = [_eventData, 0]; // ACRE_PRC77 expects an array of [mhzKnob, khzKnob] + _eventData = [_channelNumber, 0] // ACRE_PRC77 expects an array of [mhzKnob, khzKnob] }; [_radioId, "setCurrentChannel", _eventData] call EFUNC(sys_data,dataEvent); } else { diff --git a/addons/sys_core/fnc_switchChannelFast.sqf b/addons/sys_core/fnc_switchChannelFast.sqf index aeb941add..6794db9ac 100644 --- a/addons/sys_core/fnc_switchChannelFast.sqf +++ b/addons/sys_core/fnc_switchChannelFast.sqf @@ -37,6 +37,15 @@ if (_isManpack == 0 || {_isRackRadio}) then { case "ACRE_PRC152": { _channel = (_channel + _dir) min 5; }; + case "ACRE_PRC77": { + _channel = (_channel select 0) + _dir; + if (_channel > 22) then { + _channel = 0; + }; + if (_channel < 0) then { + _channel = 22; + }; + }; default { _channel = _channel + _dir; }; diff --git a/addons/sys_prc77/radio/fnc_getCurrentChannel.sqf b/addons/sys_prc77/radio/fnc_getCurrentChannel.sqf index acd0162a7..03b796c93 100644 --- a/addons/sys_prc77/radio/fnc_getCurrentChannel.sqf +++ b/addons/sys_prc77/radio/fnc_getCurrentChannel.sqf @@ -23,6 +23,4 @@ TRACE_1("GET CURRENT CHANNEL",_this); params ["", "", "", "_radioData", ""]; -private _return = 0; - -_return +HASH_GET(_radioData,"currentChannel")