aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWenZheng Li <wzli@rapyuta-robotics.com>2018-06-12 23:33:01 +0900
committerWenZheng Li <wzli@rapyuta-robotics.com>2018-06-12 23:33:01 +0900
commitc1603243eeba3f7f9ff8f9f70098105c634166e5 (patch)
tree1770c66b5c1c1c05e96b09f630894e1ae5fe87cd /src
parentfcf3528bfeba5e4646dbb0626a87c297d940a787 (diff)
downloadlibsurvive-c1603243eeba3f7f9ff8f9f70098105c634166e5.tar.gz
libsurvive-c1603243eeba3f7f9ff8f9f70098105c634166e5.tar.bz2
fixed Makefile for LINUX_USE_HIDAPI, updated tracker usb pid, fixed wired tracker lightcap data callback
Diffstat (limited to 'src')
-rwxr-xr-xsrc/survive_vive.c31
1 files changed, 5 insertions, 26 deletions
diff --git a/src/survive_vive.c b/src/survive_vive.c
index 493215a..8a4bcd5 100755
--- a/src/survive_vive.c
+++ b/src/survive_vive.c
@@ -47,15 +47,15 @@ const short vidpids[] = {
0x28de, 0x2000, 0, //Valve HMD IMU & Lighthouse Sensors
0x28de, 0x2101, 0, //Valve Watchman
0x28de, 0x2101, 1, //Valve Watchman
- 0x28de, 0x2022, 0, //HTC Tracker
+ 0x28de, 0x2300, 0, //HTC Tracker
0x28de, 0x2012, 0, //Valve Watchman, USB connected
#ifdef HIDAPI
0x28de, 0x2000, 1, //Valve HMD lighthouse(B) (only used on HIDAPI, for lightcap)
- 0x28de, 0x2022, 1, //HTC Tracker (only used on HIDAPI, for lightcap)
+ 0x28de, 0x2300, 1, //HTC Tracker (only used on HIDAPI, for lightcap)
0x28de, 0x2012, 1, //Valve Watchman, USB connected (only used on HIDAPI, for lightcap)
0x28de, 0x2000, 2, //Valve HMD lighthouse(B) (only used on HIDAPI, for lightcap)
- 0x28de, 0x2022, 2, //HTC Tracker (only used on HIDAPI, for lightcap)
+ 0x28de, 0x2300, 2, //HTC Tracker (only used on HIDAPI, for lightcap)
0x28de, 0x2012, 2, //Valve Watchman, USB connected (only used on HIDAPI, for lightcap)
#endif
@@ -1515,6 +1515,8 @@ void survive_data_cb( SurviveUSBInterface * si )
break;
}
case USB_IF_LIGHTCAP:
+ case USB_IF_TRACKER0_LIGHTCAP:
+ case USB_IF_W_WATCHMAN1_LIGHTCAP:
{
int i;
for( i = 0; i < 9; i++ )
@@ -1528,29 +1530,6 @@ void survive_data_cb( SurviveUSBInterface * si )
}
break;
}
- case USB_IF_W_WATCHMAN1_LIGHTCAP:
- case USB_IF_TRACKER0_LIGHTCAP:
- {
- 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 = (uint8_t)POP2;
- le.length = POP2;
- le.timestamp = POP4;
- if( le.sensor_id > 0xfd ) continue; //
- handle_lightcap( obj, &le );
- }
- break;
-
- if (id != 33)
- {
- int a = 0; // breakpoint here
- }
- }
case USB_IF_TRACKER0_BUTTONS:
case USB_IF_W_WATCHMAN1_BUTTONS:
{