aboutsummaryrefslogtreecommitdiff
path: root/calibrate_client.c
diff options
context:
space:
mode:
authorMichael Turvey <mturvey6@gmail.com>2017-03-24 10:10:14 -0700
committerMichael Turvey <mturvey6@gmail.com>2017-03-24 10:10:14 -0700
commit9f6c7e87266c5a7d721d4d8e3ace82dc46207387 (patch)
treee683a1e92dee99ba334c6a7d1d6857fbeffd056a /calibrate_client.c
parentc55c5928485da0432140be4befe5165c68ae4ab0 (diff)
downloadlibsurvive-9f6c7e87266c5a7d721d4d8e3ace82dc46207387.tar.gz
libsurvive-9f6c7e87266c5a7d721d4d8e3ace82dc46207387.tar.bz2
Fix linux build
Successfully tested with a wired watchman on linux. Wired tracker now succeeds in providing calibration info Still not getting light info from tracker.
Diffstat (limited to 'calibrate_client.c')
-rw-r--r--calibrate_client.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/calibrate_client.c b/calibrate_client.c
index 1a2ee41..1e18321 100644
--- a/calibrate_client.c
+++ b/calibrate_client.c
@@ -43,9 +43,9 @@ int bufferpts[32*2*3];
char buffermts[32*128*3];
int buffertimeto[32*3];
-void my_light_process( struct SurviveObject * so, int sensor_id, int acode, int timeinsweep, uint32_t timecode, uint32_t length )
+void my_light_process( struct SurviveObject * so, int sensor_id, int acode, int timeinsweep, uint32_t timecode, uint32_t length, uint32_t lh)
{
- survive_default_light_process( so, sensor_id, acode, timeinsweep, timecode, length );
+ survive_default_light_process( so, sensor_id, acode, timeinsweep, timecode, length, lh);
if( acode == -1 ) return;
//return;
@@ -160,7 +160,7 @@ int main()
// config_save("config.json");
*/
-
+
ctx = survive_init( 1 );
survive_install_light_fn( ctx, my_light_process );
@@ -219,9 +219,12 @@ int main()
so = wm0;
if( strcmp( dev, "WM1" ) == 0 )
so = wm1;
+ uint32_t lh = 0;
+ if (lineptr[0] == 'r')
+ lh = 1;
if( so )
- my_light_process( so, sensor_id, acode, timeinsweep, timecode, length );
+ my_light_process( so, sensor_id, acode, timeinsweep, timecode, length, lh );
break;
}