From eb7a93cefc958421d3bebbedc1163c73ae2e2778 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Fri, 2 Dec 2016 01:23:59 -0500 Subject: Update: Reading almost everything! --- src/survive_internal.h | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) (limited to 'src/survive_internal.h') diff --git a/src/survive_internal.h b/src/survive_internal.h index a7d8ca9..c3f8df3 100644 --- a/src/survive_internal.h +++ b/src/survive_internal.h @@ -49,9 +49,14 @@ struct SurviveUSBInterface struct SurviveObject { struct SurviveContext * ctx; - int32_t last_photo_time; - short total_photos; - int32_t total_photo_time; + char codename[4]; + int16_t buttonmask; + int16_t axis1; + int16_t axis2; + int16_t axis3; + int8_t charge; + int8_t charging:1; + int8_t ison:1; int sensors; }; @@ -64,8 +69,15 @@ struct SurviveContext struct libusb_device_handle * udev[MAX_USB_DEVS]; struct SurviveUSBInterface uiface[MAX_INTERFACES]; + //Flood info, for calculating which laser is currently sweeping. + int32_t last_photo_time; + short total_photos; + int32_t total_photo_time; + int32_t total_pulsecode_time; + //Data Subsystem struct SurviveObject headset; + struct SurviveObject watchman[2]; // struct SurvivePhoto }; @@ -78,6 +90,11 @@ int survive_usb_poll( struct SurviveContext * ctx ); //Accept Data from backend. void survive_data_cb( struct SurviveUSBInterface * si ); +//Accept higher-level data. +void survive_light_process( struct SurviveObject * so, int sensor_id, int acode, int timeinsweep, uint32_t timecode ); +void survive_imu_process( struct SurviveObject * so, int16_t * accelgyro, uint32_t timecode, int id ); + + #endif -- cgit v1.2.3