aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2018-09-02 13:14:41 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-03 13:29:40 -0700
commitfaea11e4fb6e7eef6eb0003c355ce851dc235f41 (patch)
tree1d60111f168e248ce4cd8a5d4915e19426d7f74d
parent044069484dbb0fca5bd34aa34a4d8879f80bb032 (diff)
downloadsubsurface-faea11e4fb6e7eef6eb0003c355ce851dc235f41.tar.gz
libdivecomputer: add support for DC_SAMPLE_TTS if it exists
libdivecomputer didn't use to have a TTS sample value, but we're adding one, so add conditional support for it if it exists. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--core/libdivecomputer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c
index 44bf78b80..c9d67e3ed 100644
--- a/core/libdivecomputer.c
+++ b/core/libdivecomputer.c
@@ -373,6 +373,11 @@ sample_cb(dc_sample_type_t type, dc_sample_value_t value, void *userdata)
case DC_SAMPLE_RBT:
sample->rbt.seconds = (!strncasecmp(dc->model, "suunto", 6)) ? value.rbt : value.rbt * 60;
break;
+#ifdef DC_SAMPLE_TTS
+ case DC_SAMPLE_TTS:
+ sample->tts.seconds = value.time;
+ break;
+#endif
case DC_SAMPLE_HEARTBEAT:
sample->heartbeat = heartbeat = value.heartbeat;
break;