aboutsummaryrefslogtreecommitdiff
path: root/src/survive_process.c
diff options
context:
space:
mode:
authorMichael Turvey <mwturvey@users.noreply.github.com>2018-01-04 08:48:40 -0700
committerGitHub <noreply@github.com>2018-01-04 08:48:40 -0700
commit98d62e595b90a76ecd6d4f87e95e5cc6af45a4ce (patch)
tree0ef5325a3494099b7c18c085106486fc5b6368f2 /src/survive_process.c
parent1d98830c2b99afc7dfd02ada440acd30652db61b (diff)
parent499b80ae7b538f8e66f5ec8bfa60c7136a3babf5 (diff)
downloadlibsurvive-98d62e595b90a76ecd6d4f87e95e5cc6af45a4ce.tar.gz
libsurvive-98d62e595b90a76ecd6d4f87e95e5cc6af45a4ce.tar.bz2
Merge pull request #90 from mwturvey/MakeTrackingGood
Haptic Call Plumbed
Diffstat (limited to 'src/survive_process.c')
-rw-r--r--src/survive_process.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/src/survive_process.c b/src/survive_process.c
index eaed881..4b86144 100644
--- a/src/survive_process.c
+++ b/src/survive_process.c
@@ -66,13 +66,25 @@ void survive_default_angle_process( SurviveObject * so, int sensor_id, int acode
void survive_default_button_process(SurviveObject * so, uint8_t eventType, uint8_t buttonId, uint8_t axis1Id, uint16_t axis1Val, uint8_t axis2Id, uint16_t axis2Val)
{
// do nothing.
- printf("ButtonEntry: eventType:%x, buttonId:%d, axis1:%d, axis1Val:%8.8x, axis2:%d, axis2Val:%8.8x\n",
- eventType,
- buttonId,
- axis1Id,
- axis1Val,
- axis2Id,
- axis2Val);
+ //printf("ButtonEntry: eventType:%x, buttonId:%d, axis1:%d, axis1Val:%8.8x, axis2:%d, axis2Val:%8.8x\n",
+ // eventType,
+ // buttonId,
+ // axis1Id,
+ // axis1Val,
+ // axis2Id,
+ // axis2Val);
+ if (buttonId == 24 && eventType == 1) // trigger engage
+ {
+ for (int j = 0; j < 40; j++)
+ {
+ for (int i = 0; i < 0x1; i++)
+ {
+ survive_haptic(so, 0, 0xf401, 0xb5a2, 0x0100);
+ OGUSleep(5000);
+ }
+ OGUSleep(20000);
+ }
+ }
}
void survive_default_imu_process( SurviveObject * so, int mask, FLT * accelgyromag, uint32_t timecode, int id )