-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 'acre_api_fnc_getRadioOnOffState' to accessible method (#1339)
- Loading branch information
1 parent
a364c00
commit fbf348d
Showing
5 changed files
with
166 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: Gerard | ||
* Gets the status (ON/OFF) for the given radio. | ||
* | ||
* Arguments: | ||
* 0: Radio ID <STRING> | ||
* | ||
* Return Value: | ||
* TRUE if radio is ON, False if the radio is OFF <BOOLEAN> | ||
* | ||
* Example: | ||
* ["ACRE_PR77_ID_1"] call acre_api_fnc_getRadioOnOffState | ||
* | ||
* Public: Yes | ||
*/ | ||
|
||
params ["_radioId"]; | ||
|
||
if (isNil "_radioId") exitWith { -1 }; | ||
|
||
if (!([_radioId] call EFUNC(sys_data,isRadioInitialized))) exitWith { -1 }; | ||
|
||
private _radioOnOffStatus = [_radioId] call EFUNC(sys_radio,getRadioOnOffState); | ||
|
||
_radioOnOffStatus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: Gerard | ||
* Returns the status (ON/OFF) for the given radio. | ||
* | ||
* Arguments: | ||
* 0: Unique Radio ID <STRING> | ||
* | ||
* Return Value: | ||
* TRUE if radio is ON, False if the radio is OFF <BOOLEAN> | ||
* | ||
* Example: | ||
* ["ACRE_PR77_ID_1"] call acre_sys_radio_fnc_getRadioOnOffState | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_radio"]; | ||
|
||
private _onOffState = [_radio, "getOnOffState"] call EFUNC(sys_data,dataEvent); | ||
|
||
_onOffState |
Oops, something went wrong.