From 35e08aaa24bd01e6ace453f89ddb73a6bb0508b0 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Tue, 14 Feb 2017 01:00:33 -0500 Subject: Still not working, but getting closer to dynamic OOTX decoding. --- src/survive_internal.h | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'src/survive_internal.h') diff --git a/src/survive_internal.h b/src/survive_internal.h index 446f3c0..11c9d89 100644 --- a/src/survive_internal.h +++ b/src/survive_internal.h @@ -62,6 +62,22 @@ struct SurviveUSBInterface //This is defined in survive.h struct SurviveObject; +struct SurviveCalData; + +struct BaseStationData +{ + uint8_t PositionSet:1; + float Position[3]; + float Quaternion[4]; + + uint8_t OOTXSet:1; + uint32_t BaseStationID; + float fcalphase[2]; + float fcaltilt[2]; + float fcalcurve[2]; + float fcalgibpha[2]; + float fcalgibmag[2]; +}; struct SurviveContext { @@ -75,9 +91,15 @@ struct SurviveContext light_process_func lightproc; imu_process_func imuproc; - //Data Subsystem + //Calibration data: + struct BaseStationData bsd[NUM_LIGHTHOUSES]; + + struct SurviveCalData * calptr; //If and only if the calibration subsystem is attached. + + //Data Subsystem. These should be last, as there may be additional surviveobjects. struct SurviveObject headset; - struct SurviveObject watchman[2]; + struct SurviveObject watchman[2]; //Currently only two supported watchmen. + }; -- cgit v1.2.3 From 32fbccbd7d90f1e456d1e477eab2128aaf88df93 Mon Sep 17 00:00:00 2001 From: cnlohr Date: Thu, 16 Feb 2017 17:16:31 -0500 Subject: Move to having an angle callback. --- src/survive_internal.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/survive_internal.h') diff --git a/src/survive_internal.h b/src/survive_internal.h index 11c9d89..0d0b8a4 100644 --- a/src/survive_internal.h +++ b/src/survive_internal.h @@ -86,10 +86,12 @@ struct SurviveContext struct libusb_device_handle * udev[MAX_USB_DEVS]; struct SurviveUSBInterface uiface[MAX_INTERFACES]; - text_feedback_fnptr faultfunction; - text_feedback_fnptr notefunction; + text_feedback_func faultfunction; + text_feedback_func notefunction; light_process_func lightproc; imu_process_func imuproc; + angle_process_func angleproc; + //Calibration data: struct BaseStationData bsd[NUM_LIGHTHOUSES]; @@ -112,9 +114,6 @@ int survive_get_config( char ** config, struct SurviveContext * ctx, int devno, //Accept Data from backend. void survive_data_cb( struct SurviveUSBInterface * si ); -//Accept higher-level data. -void survive_default_light_process( struct SurviveObject * so, int sensor_id, int acode, int timeinsweep, uint32_t timecode, uint32_t length ); -void survive_default_imu_process( struct SurviveObject * so, int16_t * accelgyro, uint32_t timecode, int id ); #endif -- cgit v1.2.3