summaryrefslogtreecommitdiffstats
path: root/core/units.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/units.h')
-rw-r--r--core/units.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/core/units.h b/core/units.h
index d44c50ab4..5e92a00ba 100644
--- a/core/units.h
+++ b/core/units.h
@@ -42,8 +42,11 @@ extern "C" {
* We also strive to make '0' a meaningless number saying "not
* initialized", since many values are things that may not have
* been reported (eg cylinder pressure or temperature from dive
- * computers that don't support them). But sometimes -1 is an even
- * more explicit way of saying "not there".
+ * computers that don't support them). But for some of the values
+ * 0 doesn't works as a flag for not initialized. Examples are
+ * compass bearing (bearing_t) or NDL (duration_t).
+ * Therefore some types have a default value which is -1 and has to
+ * be set at certain points in the code.
*
* Thus "millibar" for pressure, for example, or "millikelvin" for
* temperatures. Doing temperatures in celsius or fahrenheit would
@@ -70,7 +73,7 @@ typedef int64_t timestamp_t;
typedef struct
{
- uint32_t seconds; // durations up to 68 yrs
+ int32_t seconds; // durations up to 34 yrs
} duration_t;
typedef struct