Vector intergration (Hold Tab+R)

This commit is contained in:
PabstMirror
2015-03-12 12:57:44 -05:00
parent 58029101b8
commit da87425df3
5 changed files with 29 additions and 6 deletions

View File

@ -3,8 +3,9 @@ ace_microdagr
Adds a microDAGR infentry GPS device. Press home to open. Then home again to toggle an interactive version. 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. 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. 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: #### Items Added:

View File

@ -6,6 +6,7 @@ PREP(clearDisplay);
PREP(convertToTexturesDegree); PREP(convertToTexturesDegree);
PREP(convertToTexturesDistance); PREP(convertToTexturesDistance);
PREP(convertToTexturesFOS); PREP(convertToTexturesFOS);
PREP(dataTransfer);
PREP(showCenter); PREP(showCenter);
PREP(showP1); PREP(showP1);
PREP(onKeyDown); PREP(onKeyDown);

View 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);

View File

@ -13,9 +13,4 @@ if (_distance < -999) exitWith {
[-1000, -1000] // return [-1000, -1000] // return
}; };
//Send Data to connected GPS
["RangerfinderData", [_distance, _azimuth, _inclination]] call EFUNC(common,localEvent);
[sin _inclination * _distance, cos _inclination * _distance] [sin _inclination * _distance, cos _inclination * _distance]

View File

@ -74,6 +74,7 @@ switch (_this select 0) do {
if (_isReady) then { if (_isReady) then {
call FUNC(showDistance); call FUNC(showDistance);
[false] call FUNC(showCenter); [false] call FUNC(showCenter);
[] call FUNC(dataTransfer);
}; };
[_this select 1] call CBA_fnc_removePerFrameHandler; [_this select 1] call CBA_fnc_removePerFrameHandler;