diff options
author | Mike Turvey <mturvey6@gmail.com> | 2017-12-19 23:30:52 -0700 |
---|---|---|
committer | Mike Turvey <mturvey6@gmail.com> | 2017-12-19 23:30:52 -0700 |
commit | a015a5bc3631f813281c5af85a29b9d84a3eb924 (patch) | |
tree | 7df1b75b247d1031cd972fe6d7cc5f2872f61a55 /src/survive_cal.c | |
parent | 82d5acc8a7536da94399353ee446d44d7a187834 (diff) | |
download | libsurvive-a015a5bc3631f813281c5af85a29b9d84a3eb924.tar.gz libsurvive-a015a5bc3631f813281c5af85a29b9d84a3eb924.tar.bz2 |
Add support for using only 1 lighthouse
Change adds a config option for the number of "active" lighthouses,
which can be 1. Calibrate will run with a single lighthouse
if the new config option LighthouseCount is set to 1.
Diffstat (limited to 'src/survive_cal.c')
-rwxr-xr-x | src/survive_cal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/survive_cal.c b/src/survive_cal.c index ae92bad..0dbadd3 100755 --- a/src/survive_cal.c +++ b/src/survive_cal.c @@ -218,7 +218,7 @@ void survive_cal_light( struct SurviveObject * so, int sensor_id, int acode, int int i; for( i = 0; i < NUM_LIGHTHOUSES; i++ ) if( ctx->bsd[i].OOTXSet == 0 ) break; - if( i == NUM_LIGHTHOUSES ) cd->stage = 2; //TODO: Make this configuratble to allow single lighthouse. + if( i == ctx->activeLighthouses ) cd->stage = 2; //TODO: Make this configuratble to allow single lighthouse. } break; case 3: //Look for light sync lengths. @@ -309,7 +309,7 @@ void survive_cal_angle( struct SurviveObject * so, int sensor_id, int acode, uin cd->found_common = 1; for( i = 0; i < cd->numPoseObjects; i++ ) //for( i = 0; i < MAX_SENSORS_TO_CAL/SENSORS_PER_OBJECT; i++ ) - for( j = 0; j < NUM_LIGHTHOUSES; j++ ) + for( j = 0; j < ctx->activeLighthouses; j++ ) { int sensors_visible = 0; for( k = 0; k < SENSORS_PER_OBJECT; k++ ) |