mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
de81effb25
commit
1f8506ce64
5 changed files with 61 additions and 47 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue