diff options
author | Josh Allen <axlecrusher@gmail.com> | 2017-02-14 20:57:13 -0500 |
---|---|---|
committer | Josh Allen <axlecrusher@gmail.com> | 2017-02-14 20:57:13 -0500 |
commit | e1e7bfbad7016e29ca3cbb4de2f93d37462ca251 (patch) | |
tree | 51498ee43cceb6587ab3c37e3f9bf048182cac54 /src/survive_cal.h | |
parent | 7d28d767ec888a189a338b984062b8097b63fddd (diff) | |
parent | 23a202f50fc0f9eb9127bebaf34c48d45776a25c (diff) | |
download | libsurvive-e1e7bfbad7016e29ca3cbb4de2f93d37462ca251.tar.gz libsurvive-e1e7bfbad7016e29ca3cbb4de2f93d37462ca251.tar.bz2 |
Merge github.com:cnlohr/libsurvive
Diffstat (limited to 'src/survive_cal.h')
-rw-r--r-- | src/survive_cal.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/survive_cal.h b/src/survive_cal.h new file mode 100644 index 0000000..a74bf95 --- /dev/null +++ b/src/survive_cal.h @@ -0,0 +1,44 @@ +// (C) 2016, 2017 <>< C. N. Lohr, Under MIT/x11 License. + +// All OOTX code was written by J. Allen. Rest of the code is probably mostly CNLohr. + +#ifndef _SURVIVE_CAL_H +#define _SURVIVE_CAL_H + +//This is a file that is intended for use with capturing vive data during the +//setup phase. This and survive_cal.c/.h should not be included on embedded +//uses of libsurvive. + +//This file handles the following: +// 1: Decoding the OOTX data from the lighthouses. +// 2: Setting OOTX props in the survive context. +// 3: Collect a bunch of data with the vive pointed up and the watchment to either side. +// 4: Running the code to find the lighthouses. +// 5: Setting the information needed to develop the worldspace model in the SurviveContext. + + +#include <stdint.h> +#include "ootx_decoder.h" +#include "survive_internal.h" + +void survive_cal_install( struct SurviveContext * ctx ); +int survive_cal_get_status( struct SurviveContext * ctx, char * description, int max_data ); + +//void survive_cal_teardown( struct SurviveContext * ctx ); + +//Called from survive_default_light_process +void survive_cal_light( struct SurviveObject * so, int sensor_id, int acode, int timeinsweep, uint32_t timecode, uint32_t length ); + +struct SurviveCalData +{ + //Stage: + // 0: Idle + // 1: Collecting OOTX data. + int stage; + + //OOTX Data is sync'd off of + ootx_decoder_context ootx_decoders[NUM_LIGHTHOUSES]; +}; + +#endif + |