aboutsummaryrefslogtreecommitdiff
path: root/src/survive_vive.c
diff options
context:
space:
mode:
authormwturvey <michael.w.turvey@intel.com>2017-03-17 14:41:59 -0700
committermwturvey <michael.w.turvey@intel.com>2017-03-17 14:41:59 -0700
commitb6981854dff11022e3de56e56cbf4633f1c49598 (patch)
treef5b8f4ff1425f704d791d5b9af9c8af65455868d /src/survive_vive.c
parent94be8ccdbfb2f44c9bc569428537444030ba8eeb (diff)
parenta53c520c2d1a3bb9faa4cb5e4ee9ccc48bb1835f (diff)
downloadlibsurvive-b6981854dff11022e3de56e56cbf4633f1c49598.tar.gz
libsurvive-b6981854dff11022e3de56e56cbf4633f1c49598.tar.bz2
Merge branch 'master' into UsbTrackerOnWin
# Conflicts: # src/survive_vive.c
Diffstat (limited to 'src/survive_vive.c')
-rwxr-xr-xsrc/survive_vive.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/survive_vive.c b/src/survive_vive.c
index d4a853d..a9b295f 100755
--- a/src/survive_vive.c
+++ b/src/survive_vive.c
@@ -18,7 +18,7 @@
#include <string.h>
#include <sys/stat.h>
#include <os_generic.h>
-#ifndef __FreeBSD__
+#if !defined(__FreeBSD__) && !defined(__APPLE__)
#include <malloc.h> // for alloca
#endif
@@ -625,6 +625,7 @@ int survive_vive_usb_poll( struct SurviveContext * ctx, void * v )
}
return r;
#endif
+ return 0;
}
@@ -1113,9 +1114,12 @@ void survive_data_cb( SurviveUSBInterface * si )
}
case USB_IF_W_WATCHMAN1_LIGHTCAP:
{
- int i;
+ int i=0;
for( i = 0; i < 7; i++ )
{
+ unsigned short *sensorId = (unsigned short *)readdata;
+ unsigned short *length = (unsigned short *)(&(readdata[2]));
+ unsigned long *time = (unsigned long *)(&(readdata[4]));
LightcapElement le;
le.sensor_id = POP2;
le.length = POP2;
@@ -1282,7 +1286,6 @@ int survive_vive_close( SurviveContext * ctx, void * driver )
SurviveViveData * sv = driver;
survive_vive_usb_close( sv );
-
return 0;
}