mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add various dive fixups, and show pressure (if any) in the plot
Now the dive profile plot *really* needs some units. The pressure is just a random line otherwise. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
f8e39675cc
commit
1e75ceac0d
6 changed files with 308 additions and 176 deletions
15
parse-xml.c
15
parse-xml.c
|
@ -29,7 +29,7 @@ static void record_dive(struct dive *dive)
|
|||
dive_table.dives = dives;
|
||||
dive_table.allocated = allocated;
|
||||
}
|
||||
dives[nr] = dive;
|
||||
dives[nr] = fixup_dive(dive);
|
||||
dive_table.nr = nr+1;
|
||||
}
|
||||
|
||||
|
@ -787,19 +787,6 @@ static void sample_end(void)
|
|||
if (!dive)
|
||||
return;
|
||||
|
||||
if (sample->time.seconds > dive->duration.seconds) {
|
||||
if (sample->depth.mm)
|
||||
dive->duration = sample->time;
|
||||
}
|
||||
|
||||
if (sample->depth.mm > dive->maxdepth.mm)
|
||||
dive->maxdepth.mm = sample->depth.mm;
|
||||
|
||||
if (sample->temperature.mkelvin) {
|
||||
if (!dive->watertemp.mkelvin || dive->watertemp.mkelvin > sample->temperature.mkelvin)
|
||||
dive->watertemp = sample->temperature;
|
||||
}
|
||||
|
||||
sample = NULL;
|
||||
dive->samples++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue