aboutsummaryrefslogtreecommitdiff
path: root/src/survive_config.c
diff options
context:
space:
mode:
authorJustin Berger <j.david.berger@gmail.com>2018-04-02 10:10:33 -0600
committerJustin Berger <j.david.berger@gmail.com>2018-04-02 10:10:33 -0600
commit75460f240c9d003e4ca2e6dda9b2146a74df7ffa (patch)
tree957b26f0539df176b61ad2ec72fbb0658b147919 /src/survive_config.c
parent2b63278497130d01b1fbc7e6a94b6ad8e32ab4dd (diff)
parent1724abef15a4090640bd82ba408681438316de7e (diff)
downloadlibsurvive-75460f240c9d003e4ca2e6dda9b2146a74df7ffa.tar.gz
libsurvive-75460f240c9d003e4ca2e6dda9b2146a74df7ffa.tar.bz2
Merge remote-tracking branch 'origin/master' into imu
Diffstat (limited to 'src/survive_config.c')
-rw-r--r--src/survive_config.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/survive_config.c b/src/survive_config.c
index 7b68ae4..d67cd8e 100644
--- a/src/survive_config.c
+++ b/src/survive_config.c
@@ -119,12 +119,13 @@ void config_read_lighthouse(config_group *lh_config, BaseStationData *bsd, uint8
FLT defaults[7] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
bsd->BaseStationID = config_read_uint32(cg, "id", 0);
+ bsd->mode = config_read_uint32(cg, "mode", 0);
config_read_float_array(cg, "pose", &bsd->Pose.Pos[0], defaults, 7);
- config_read_float_array(cg, "fcalphase", bsd->fcalphase, defaults, 2);
- config_read_float_array(cg, "fcaltilt", bsd->fcaltilt, defaults, 2);
- config_read_float_array(cg, "fcalcurve", bsd->fcalcurve, defaults, 2);
- config_read_float_array(cg, "fcalgibpha", bsd->fcalgibpha, defaults, 2);
- config_read_float_array(cg, "fcalgibmag", bsd->fcalgibmag, defaults, 2);
+ config_read_float_array(cg, "fcalphase", bsd->fcal.phase, defaults, 2);
+ config_read_float_array(cg, "fcaltilt", bsd->fcal.tilt, defaults, 2);
+ config_read_float_array(cg, "fcalcurve", bsd->fcal.curve, defaults, 2);
+ config_read_float_array(cg, "fcalgibpha", bsd->fcal.gibpha, defaults, 2);
+ config_read_float_array(cg, "fcalgibmag", bsd->fcal.gibmag, defaults, 2);
bsd->PositionSet = config_read_uint32(cg, "PositionSet", 0);
}
@@ -132,12 +133,13 @@ void config_set_lighthouse(config_group *lh_config, BaseStationData *bsd, uint8_
config_group *cg = lh_config + idx;
config_set_uint32(cg, "index", idx);
config_set_uint32(cg, "id", bsd->BaseStationID);
+ config_set_uint32(cg, "mode", bsd->mode);
config_set_float_a(cg, "pose", &bsd->Pose.Pos[0], 7);
- config_set_float_a(cg, "fcalphase", bsd->fcalphase, 2);
- config_set_float_a(cg, "fcaltilt", bsd->fcaltilt, 2);
- config_set_float_a(cg, "fcalcurve", bsd->fcalcurve, 2);
- config_set_float_a(cg, "fcalgibpha", bsd->fcalgibpha, 2);
- config_set_float_a(cg, "fcalgibmag", bsd->fcalgibmag, 2);
+ config_set_float_a(cg, "fcalphase", bsd->fcal.phase, 2);
+ config_set_float_a(cg, "fcaltilt", bsd->fcal.tilt, 2);
+ config_set_float_a(cg, "fcalcurve", bsd->fcal.curve, 2);
+ config_set_float_a(cg, "fcalgibpha", bsd->fcal.gibpha, 2);
+ config_set_float_a(cg, "fcalgibmag", bsd->fcal.gibmag, 2);
config_set_uint32(cg, "PositionSet", bsd->PositionSet);
}