diff --git a/addons/sys_sem70/radio/fnc_setCurrentChannel.sqf b/addons/sys_sem70/radio/fnc_setCurrentChannel.sqf index 7c27fd134..59ed3aa8b 100644 --- a/addons/sys_sem70/radio/fnc_setCurrentChannel.sqf +++ b/addons/sys_sem70/radio/fnc_setCurrentChannel.sqf @@ -40,31 +40,31 @@ params ["_radioId", "", "_eventData", "_radioData"]; TRACE_2("setCurrentChannel",_radioID,_eventData); -private _manualChannel = HASH_GET(_radioData, "manualChannelSelection"); +private _manualChannel = HASH_GET(_radioData,"manualChannelSelection"); TRACE_1("ManualChannel",_manualChannel); if (_manualChannel isEqualTo 1) then { - private _channels = HASH_GET(_radioData, "channels"); - private _channel = HASHLIST_SELECT(_channels, GVAR(manualChannel)); + private _channels = HASH_GET(_radioData,"channels"); + private _channel = HASHLIST_SELECT(_channels,GVAR(manualChannel)); if (_eventData isEqualType []) then { // if event data comes from a setChannel-type API in the [MHzKnobPos,KHzKnobPos] format private _newFreq = ((_eventData select 0) + 30) + ((_eventData select 1) * 25 / 1000); - HASH_SET(_channel, "frequencyTX", _newFreq); - HASH_SET(_channel, "frequencyRX", _newFreq); + HASH_SET(_channel,"frequencyTX",_newFreq); + HASH_SET(_channel,"frequencyRX",_newFreq); TRACE_1("",_newFreq); - HASH_SET(_radioData, "MHzKnobPosition", (_eventData select 0)); - HASH_SET(_radioData, "kHzKnobPosition", (_eventData select 1)); + HASH_SET(_radioData,"MHzKnobPosition",(_eventData select 0)); + HASH_SET(_radioData,"kHzKnobPosition",(_eventData select 1)); } else { - private _currentMHzFrequency = HASH_GET(_radioData, "MHzKnobPosition"); + private _currentMHzFrequency = HASH_GET(_radioData,"MHzKnobPosition"); _currentMHzFrequency = _currentMHzFrequency + 30; - private _currentkHzFrequency = HASH_GET(_radioData, "kHzKnobPosition"); + private _currentkHzFrequency = HASH_GET(_radioData,"kHzKnobPosition"); _currentkHzFrequency = _currentkHzFrequency * 25 / 1000; private _newFreq = _currentMHzFrequency + _currentkHzFrequency; - HASH_SET(_channel, "frequencyTX", _newFreq); - HASH_SET(_channel, "frequencyRX", _newFreq); + HASH_SET(_channel,"frequencyTX",_newFreq); + HASH_SET(_channel,"frequencyRX",_newFreq); TRACE_3("",_currentMHzFrequency,_currentkHzFrequency,_newFreq); };