From 499b80ae7b538f8e66f5ec8bfa60c7136a3babf5 Mon Sep 17 00:00:00 2001 From: Mike Turvey Date: Thu, 4 Jan 2018 08:47:42 -0700 Subject: 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 --- include/libsurvive/survive.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/libsurvive/survive.h') diff --git a/include/libsurvive/survive.h b/include/libsurvive/survive.h index e4afadf..0cfab1f 100644 --- a/include/libsurvive/survive.h +++ b/include/libsurvive/survive.h @@ -19,6 +19,7 @@ struct SurviveObject char codename[4]; //3 letters, null-terminated. Currently HMD, WM0, WM1. char drivername[4]; //3 letters for driver. Currently "HTC" + void *driver; int32_t buttonmask; int16_t axis1; @@ -68,6 +69,7 @@ struct SurviveObject FLT* gyro_bias; // size is FLT*3. contains x,y,z FLT* gyro_scale; // size is FLT*3. contains x,y,z + haptic_func haptic; //Debug int tsl; @@ -179,6 +181,9 @@ void survive_cal_install( SurviveContext * ctx ); //XXX This will be removed if // Read back a human-readable string description of the calibration status int survive_cal_get_status( struct SurviveContext * ctx, char * description, int description_length ); +// Induce haptic feedback +int survive_haptic(SurviveObject * so, uint8_t reserved, uint16_t pulseHigh, uint16_t pulseLow, uint16_t repeatCount); + //Call these from your callback if overridden. //Accept higher-level data. void survive_default_light_process( SurviveObject * so, int sensor_id, int acode, int timeinsweep, uint32_t timecode, uint32_t length , uint32_t lh); -- cgit v1.2.3