aboutsummaryrefslogtreecommitdiff
path: root/src/survive.c
diff options
context:
space:
mode:
authorMike Turvey <mturvey6@gmail.com>2018-01-04 08:47:42 -0700
committerMike Turvey <mturvey6@gmail.com>2018-01-04 08:47:42 -0700
commit499b80ae7b538f8e66f5ec8bfa60c7136a3babf5 (patch)
tree0ef5325a3494099b7c18c085106486fc5b6368f2 /src/survive.c
parentf183aa480c549695ac5b481fade04e62f71d1e0a (diff)
downloadlibsurvive-499b80ae7b538f8e66f5ec8bfa60c7136a3babf5.tar.gz
libsurvive-499b80ae7b538f8e66f5ec8bfa60c7136a3babf5.tar.bz2
Haptic Call Plumbed
The plumbing is now in place for the haptic call. Left in place a "demo" where haptic is called when a controller's trigger is pulled
Diffstat (limited to 'src/survive.c')
-rwxr-xr-xsrc/survive.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/survive.c b/src/survive.c
index d3c0918..75c07bf 100755
--- a/src/survive.c
+++ b/src/survive.c
@@ -60,7 +60,7 @@ static void button_servicer(void * context)
// should never happen. indicates failure of code pushing stuff onto
// the buttonQueue
// if it does happen, it will kill all future button input
- printf("ERROR: Unpopulated ButtonQueueEntry!");
+ printf("ERROR: Unpopulated ButtonQueueEntry! NextReadIndex=%d\n", ctx->buttonQueue.nextReadIndex);
return;
}
@@ -272,6 +272,17 @@ int survive_send_magic( SurviveContext * ctx, int magic_code, void * data, int d
return 0;
}
+int survive_haptic(SurviveObject * so, uint8_t reserved, uint16_t pulseHigh, uint16_t pulseLow, uint16_t repeatCount)
+{
+ if (NULL == so || NULL == so->haptic)
+ {
+ return -404;
+ }
+
+ return so->haptic(so, reserved, pulseHigh, pulseLow, repeatCount);
+}
+
+
void survive_close( SurviveContext * ctx )
{
const char * DriverName;