mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 21:03:29 +00:00
Refacted UDP Socket config and created UAS addon
This commit is contained in:
17
addons/uav/functions/fnc_parseMavlinkCallbackData.sqf
Normal file
17
addons/uav/functions/fnc_parseMavlinkCallbackData.sqf
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
params [["_raw", "", [""]]];
|
||||
|
||||
private _pairs = createHashMap;
|
||||
|
||||
{
|
||||
private _entry = _x;
|
||||
private _separatorIndex = _entry find "=";
|
||||
if (_separatorIndex > 0) then {
|
||||
private _key = _entry select [0, _separatorIndex];
|
||||
private _value = _entry select [_separatorIndex + 1];
|
||||
_pairs set [_key, _value];
|
||||
};
|
||||
} forEach (_raw splitString ";");
|
||||
|
||||
_pairs
|
||||
Reference in New Issue
Block a user