mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Do not add uninitialized setpoint or ndl
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
d39eb81bfb
commit
48b88f6aca
1 changed files with 2 additions and 2 deletions
4
file.c
4
file.c
|
@ -766,9 +766,9 @@ int parse_txt_file(const char *filename, const char *csv)
|
|||
QT_TRANSLATE_NOOP("gettextFromC", "gaschange"));
|
||||
if (!has_depth)
|
||||
add_sample_data(sample, POSEIDON_DEPTH, prev_depth);
|
||||
if (!has_setpoint)
|
||||
if (!has_setpoint && prev_setpoint >= 0)
|
||||
add_sample_data(sample, POSEIDON_SETPOINT, prev_setpoint);
|
||||
if (!has_ndl)
|
||||
if (!has_ndl && prev_ndl >= 0)
|
||||
add_sample_data(sample, POSEIDON_NDL, prev_ndl);
|
||||
if (cylinder_pressure)
|
||||
dive->cylinder[1].sample_end.mbar = cylinder_pressure * 1000;
|
||||
|
|
Loading…
Add table
Reference in a new issue