From 15c23eb7f6a64061c349b20da63cb5bf3b870cef Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 7 May 2020 12:19:40 -0700 Subject: [PATCH] Add time-to-surface sample type This adds the ability to report time to surface (TTS) as a sample, which a number of backends will want. Signed-off-by: Linus Torvalds --- include/libdivecomputer/parser.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/include/libdivecomputer/parser.h b/include/libdivecomputer/parser.h index 6868883..fdc5ea1 100644 --- a/include/libdivecomputer/parser.h +++ b/include/libdivecomputer/parser.h @@ -46,9 +46,13 @@ typedef enum dc_sample_type_t { DC_SAMPLE_PPO2, DC_SAMPLE_CNS, DC_SAMPLE_DECO, - DC_SAMPLE_GASMIX + DC_SAMPLE_GASMIX, + DC_SAMPLE_TTS, // time to surface in seconds } dc_sample_type_t; +// Make it easy to test support compile-time with "#ifdef DC_SAMPLE_TTS" +#define DC_SAMPLE_TTS DC_SAMPLE_TTS + typedef enum dc_field_type_t { DC_FIELD_DIVETIME, DC_FIELD_MAXDEPTH,