mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Vector intergration (Hold Tab+R)
This commit is contained in:
parent
58029101b8
commit
da87425df3
@ -3,8 +3,9 @@ ace_microdagr
|
||||
|
||||
Adds a microDAGR infentry GPS device. Press home to open. Then home again to toggle an interactive version.
|
||||
Info/Compass/Minimap modes are selectable by the bottom buttons. Tap the top bar to open the menu and access Mark/Waypoints/Connect To/Settings modes.
|
||||
Tap the minimap button again to toggle map modes (if available).
|
||||
Enter waypoints from the menu or double tapping on the minimap.
|
||||
Can interface with the `ace_vector`.
|
||||
Can interface with the `ace_vector`. Hold Azimuth+Range and release (see page 14 of vector's manual)
|
||||
|
||||
#### Items Added:
|
||||
|
||||
|
@ -6,6 +6,7 @@ PREP(clearDisplay);
|
||||
PREP(convertToTexturesDegree);
|
||||
PREP(convertToTexturesDistance);
|
||||
PREP(convertToTexturesFOS);
|
||||
PREP(dataTransfer);
|
||||
PREP(showCenter);
|
||||
PREP(showP1);
|
||||
PREP(onKeyDown);
|
||||
|
25
addons/vector/functions/fnc_dataTransfer.sqf
Normal file
25
addons/vector/functions/fnc_dataTransfer.sqf
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Data transfer over a connected cable. Based on page 14 of pdf.
|
||||
*
|
||||
* Arguments:
|
||||
* Nothing
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [] call ace_vector_fnc_dataTransfer
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_distance", "_direction", "_azimuth", "_inclination"];
|
||||
|
||||
_distance = call FUNC(getDistance);
|
||||
_direction = call FUNC(getDirection);
|
||||
_azimuth = _direction select 0;
|
||||
_inclination = _direction select 1;
|
||||
//Send Data to connected GPS
|
||||
["RangerfinderData", [_distance, _azimuth, _inclination]] call EFUNC(common,localEvent);
|
@ -13,9 +13,4 @@ if (_distance < -999) exitWith {
|
||||
[-1000, -1000] // return
|
||||
};
|
||||
|
||||
|
||||
//Send Data to connected GPS
|
||||
["RangerfinderData", [_distance, _azimuth, _inclination]] call EFUNC(common,localEvent);
|
||||
|
||||
|
||||
[sin _inclination * _distance, cos _inclination * _distance]
|
||||
|
@ -74,6 +74,7 @@ switch (_this select 0) do {
|
||||
if (_isReady) then {
|
||||
call FUNC(showDistance);
|
||||
[false] call FUNC(showCenter);
|
||||
[] call FUNC(dataTransfer);
|
||||
};
|
||||
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
|
Loading…
Reference in New Issue
Block a user