summaryrefslogtreecommitdiffstats
path: root/load-git.c
diff options
context:
space:
mode:
authorGravatar Willem Ferguson <willemferguson@zoology.up.ac.za>2014-06-03 19:21:41 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-03 17:05:25 -0700
commiteaf6d564874ac838dc4f3cca7a781034ae60ef7f (patch)
treed214c58bdc33f6dbd058afe715de357dd14d4114 /load-git.c
parent1fec6453a2b7b6dcd34901a4e92dd11aae38879c (diff)
downloadsubsurface-eaf6d564874ac838dc4f3cca7a781034ae60ef7f.tar.gz
CCR code: Change to sample structure
1) All the variables in the sample structures are strongly typed 2) Two additional types were declared in units.h: o2pressure_t bearing_t 3) The following variables were added: diluentpressure o2setpoint o2sensor[3] 4) Changes to a number of files were made to chanf sample->po2 to sample->po2.mbar bearing to bearring.degrees Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'load-git.c')
-rw-r--r--load-git.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/load-git.c b/load-git.c
index acfdd2527..f50b067cf 100644
--- a/load-git.c
+++ b/load-git.c
@@ -375,8 +375,7 @@ static void parse_sample_keyvalue(void *_sample, const char *key, const char *va
}
if (!strcmp(key, "po2")) {
pressure_t p = get_pressure(value);
- // Ugh, typeless.
- sample->po2 = p.mbar;
+ sample->po2.mbar = p.mbar;
return;
}
if (!strcmp(key, "heartbeat")) {
@@ -384,7 +383,7 @@ static void parse_sample_keyvalue(void *_sample, const char *key, const char *va
return;
}
if (!strcmp(key, "bearing")) {
- sample->bearing = atoi(value);
+ sample->bearing.degrees = atoi(value);
return;
}
report_error("Unexpected sample key/value pair (%s/%s)", key, value);