Skip to content

Commit

Permalink
Remove spaces from Macros
Browse files Browse the repository at this point in the history
  • Loading branch information
mrschick committed Jul 4, 2024
1 parent d0de00f commit dbf4865
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions addons/sys_sem70/radio/fnc_setCurrentChannel.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

Expand Down

0 comments on commit dbf4865

Please sign in to comment.