Planner: show mean depth

Almost invisible, mostly looking like an odd bug in the profile code,
there was a tiny red line at depth 0 in the planned profile. Turns out
that was the missing mean depth. We didn't populate enough data in the
dive computer of the dive we generated from the plan (and the length of
the depth line was incorrectly determined by the duration of the dive
instead of the duration stored in the dive computer).

Fixes #570

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-08-04 07:36:07 -07:00
parent 41953c8c46
commit 825eb019ab
4 changed files with 7 additions and 3 deletions

2
dive.c
View file

@ -542,7 +542,7 @@ static void update_temperature(temperature_t *temperature, int new)
*
* This ignores any surface time in the middle of the dive.
*/
static void fixup_dc_duration(struct divecomputer *dc)
void fixup_dc_duration(struct divecomputer *dc)
{
int duration, i;
int lasttime, lastdepth, depthtime;