aboutsummaryrefslogtreecommitdiff
path: root/src/survive_internal.h
diff options
context:
space:
mode:
authorcnlohr <lohr85@gmail.com>2016-12-02 01:23:59 -0500
committercnlohr <lohr85@gmail.com>2016-12-02 01:23:59 -0500
commiteb7a93cefc958421d3bebbedc1163c73ae2e2778 (patch)
tree8948ebd2508404aa4cadaea431e0fb960d3f4d0c /src/survive_internal.h
parent6c247285514fd5ae3d7497871aba5beaaa832243 (diff)
downloadlibsurvive-eb7a93cefc958421d3bebbedc1163c73ae2e2778.tar.gz
libsurvive-eb7a93cefc958421d3bebbedc1163c73ae2e2778.tar.bz2
Update: Reading almost everything!
Diffstat (limited to 'src/survive_internal.h')
-rw-r--r--src/survive_internal.h23
1 files changed, 20 insertions, 3 deletions
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