summaryrefslogtreecommitdiffstats
path: root/libdivecomputer.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2015-01-21 08:52:28 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-22 06:02:34 +1200
commite0c0ba4836a9cac104f1a8c40bb3e9c1da9d8747 (patch)
tree92ed275368497bc67fe250ff82afa419334665dc /libdivecomputer.c
parente8b02d3b2a9bd620e40d6444852c9d86fde41e66 (diff)
downloadsubsurface-e0c0ba4836a9cac104f1a8c40bb3e9c1da9d8747.tar.gz
Set divemode to FREEDIVE now when we support that
Previous code mapped all our free dive inputs to OC, but now when we actually have a FREEDIVE divemode, we can do better. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'libdivecomputer.c')
-rw-r--r--libdivecomputer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libdivecomputer.c b/libdivecomputer.c
index 41ec876a7..6a16eb12d 100644
--- a/libdivecomputer.c
+++ b/libdivecomputer.c
@@ -552,6 +552,8 @@ static int dive_cb(const unsigned char *data, unsigned int size,
if (rc == DC_STATUS_SUCCESS)
switch(divemode) {
case DC_DIVEMODE_FREEDIVE:
+ dive->dc.divemode = FREEDIVE;
+ break;
case DC_DIVEMODE_GAUGE:
case DC_DIVEMODE_OC: /* Open circuit */
dive->dc.divemode = OC;