mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
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>
This commit is contained in:
parent
044069484d
commit
faea11e4fb
1 changed files with 5 additions and 0 deletions
|
@ -373,6 +373,11 @@ sample_cb(dc_sample_type_t type, dc_sample_value_t value, void *userdata)
|
||||||
case DC_SAMPLE_RBT:
|
case DC_SAMPLE_RBT:
|
||||||
sample->rbt.seconds = (!strncasecmp(dc->model, "suunto", 6)) ? value.rbt : value.rbt * 60;
|
sample->rbt.seconds = (!strncasecmp(dc->model, "suunto", 6)) ? value.rbt : value.rbt * 60;
|
||||||
break;
|
break;
|
||||||
|
#ifdef DC_SAMPLE_TTS
|
||||||
|
case DC_SAMPLE_TTS:
|
||||||
|
sample->tts.seconds = value.time;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
case DC_SAMPLE_HEARTBEAT:
|
case DC_SAMPLE_HEARTBEAT:
|
||||||
sample->heartbeat = heartbeat = value.heartbeat;
|
sample->heartbeat = heartbeat = value.heartbeat;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue