diff options
-rw-r--r-- | dive.c | 3 | ||||
-rw-r--r-- | dive.h | 1 | ||||
-rw-r--r-- | profile.c | 7 |
3 files changed, 4 insertions, 7 deletions
@@ -498,8 +498,7 @@ struct dive *fixup_dive(struct dive *dive) if (sample->cns > dive->maxcns) dive->maxcns = sample->cns; } - dive->start = start; - dive->end = end; + /* if all the samples for a cylinder have pressure data that * is basically equidistant throw out the sample cylinder pressure * information but make sure we still have a valid start and end @@ -303,7 +303,6 @@ struct dive { struct dive *next, **pprev; int selected; gboolean downloaded; - int start, end; timestamp_t when; char *location; char *notes; @@ -1577,7 +1577,8 @@ static void calculate_max_limits(struct dive *dive, struct divecomputer *dc, str if (depth > maxdepth) maxdepth = s->depth.mm; - if ((depth || lastdepth) && s->time.seconds > maxtime) + if ((depth > SURFACE_THRESHOLD || lastdepth > SURFACE_THRESHOLD) && + s->time.seconds > maxtime) maxtime = s->time.seconds; lastdepth = depth; s++; @@ -1601,9 +1602,7 @@ static struct plot_data *populate_plot_entries(struct dive *dive, struct divecom int lastdepth, lasttime; struct plot_data *plot_data; - maxtime = get_maxtime(pi); - if (dive->end > 0) - maxtime = dive->end; + maxtime = pi->maxtime; /* * We want to have a plot_info event at least every 10s (so "maxtime/10+1"), |