diff options
author | Stefan Fuchs <sfuchs@gmx.de> | 2017-11-05 15:56:35 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-11-13 20:50:10 -0800 |
commit | 1f8506ce645000bd158fcd3b2c9c799505c78bb2 (patch) | |
tree | e0a2b81e3198240d8cf16a59ef7ff00054dc5c18 /core/units.h | |
parent | de81effb258c9c55af299ef48e79df4de941b391 (diff) | |
download | subsurface-1f8506ce645000bd158fcd3b2c9c799505c78bb2.tar.gz |
Display values in info box only if value is interesting
Type duration_t changed from uint to int.
Default value of '-1' introduced for some of the values in struct sample:
NDL used -1 as default.
Bearing uses -1 as default (no bearing set).
Display pXX, EAD, END, density, MOD only if values are larger than 0.
In profile don't display data from two first and two last plot_data
entries in info box.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Diffstat (limited to 'core/units.h')
-rw-r--r-- | core/units.h | 9 |
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 |