aboutsummaryrefslogtreecommitdiff
path: root/src/survive_cal.c
diff options
context:
space:
mode:
authorJoshua Allen <axlecrusher@gmail.com>2017-02-27 20:52:26 -0500
committerJoshua Allen <axlecrusher@gmail.com>2017-02-27 20:52:26 -0500
commite8d696e03128242be33eb0734addee645e894635 (patch)
treec099479bef1f196e8bf96cb6a25d4bbecf6ba601 /src/survive_cal.c
parentf78983a584768a54503535be0366b07c97738299 (diff)
downloadlibsurvive-e8d696e03128242be33eb0734addee645e894635.tar.gz
libsurvive-e8d696e03128242be33eb0734addee645e894635.tar.bz2
basic config can be written to file
Diffstat (limited to 'src/survive_cal.c')
-rw-r--r--src/survive_cal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/survive_cal.c b/src/survive_cal.c
index 760692c..41d3fb1 100644
--- a/src/survive_cal.c
+++ b/src/survive_cal.c
@@ -15,6 +15,8 @@
#include <sys/stat.h>
#include <sys/types.h>
+#include "survive_config.h"
+
#define PTS_BEFORE_COMMON 32
#define NEEDED_COMMON_POINTS 10
#define NEEDED_TIMES_OF_COMMON 5
@@ -49,6 +51,9 @@ void ootx_packet_clbk_d(ootx_decoder_context *ct, ootx_packet* packet)
b->fcalgibmag[0] = v6.fcal_0_gibmag;
b->fcalgibmag[1] = v6.fcal_1_gibmag;
b->OOTXSet = 1;
+
+ config_set_lighthouse(b,id);
+ config_save("config.json");
}
int survive_cal_get_status( struct SurviveContext * ctx, char * description, int description_length )