diff options
author | Justin Berger <j.david.berger@gmail.com> | 2018-04-05 06:56:57 -0600 |
---|---|---|
committer | Justin Berger <j.david.berger@gmail.com> | 2018-04-05 06:56:57 -0600 |
commit | 4b045e61ed6f3812cbf273ae279bfd7bc1ce029c (patch) | |
tree | e16ab505bfccc638f0ff288a8cca8c226a597767 /src/survive_cal.c | |
parent | d6d310fdd13c11382f37faca6a0c20b361ae9c40 (diff) | |
parent | f765f0e85cbd1bd00c7f5a18d6e7a4ada0db5918 (diff) | |
download | libsurvive-4b045e61ed6f3812cbf273ae279bfd7bc1ce029c.tar.gz libsurvive-4b045e61ed6f3812cbf273ae279bfd7bc1ce029c.tar.bz2 |
Merge branch 'master' into simple_api
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 36e0a31..faf2ac7 100755 --- a/src/survive_cal.c +++ b/src/survive_cal.c @@ -81,7 +81,7 @@ void ootx_packet_clbk_d(ootx_decoder_context *ct, ootx_packet* packet) config_set_lighthouse(ctx->lh_config,b,id); lighthouses_completed++; - if (lighthouses_completed >= NUM_LIGHTHOUSES) { + if (lighthouses_completed >= ctx->activeLighthouses) { config_save(ctx, survive_configs(ctx, "configfile", SC_GET, "config.json")); } } @@ -224,7 +224,7 @@ void survive_cal_light( struct SurviveObject * so, int sensor_id, int acode, int ootx_pump_bit( &cd->ootx_decoders[lhid], dbit ); } int i; - for( i = 0; i < NUM_LIGHTHOUSES; i++ ) + for( i = 0; i < ctx->activeLighthouses; i++ ) if( ctx->bsd[i].OOTXSet == 0 ) break; if( i == ctx->activeLighthouses ) cd->stage = 2; //TODO: Make this configuratble to allow single lighthouse. } |