mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Don't draw temperature plot past the end of the dive
Just like we end depth and tank pressure plots once we are on the surface (this is relevant for dive computers like the uemis Zurich that keep recording samples after the end of the dive) Signed-off-by: Dirk Hohndel <dirk@hohndel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
ed4e71a817
commit
b49c878a74
1 changed files with 2 additions and 0 deletions
|
@ -372,6 +372,8 @@ static void plot_temperature_profile(struct dive *dive, struct graphics_context
|
|||
set_source_rgba(gc, 0.2, 0.2, 1.0, 0.8);
|
||||
for (i = 0; i < dive->samples; i++) {
|
||||
struct sample *sample = dive->sample+i;
|
||||
if (sample->time.seconds > dive->duration.seconds)
|
||||
break; /* let's not plot surface temp events */
|
||||
int mkelvin = sample->temperature.mkelvin;
|
||||
if (!mkelvin) {
|
||||
if (!last)
|
||||
|
|
Loading…
Add table
Reference in a new issue