diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | core/plannernotes.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 42f8d88dc..5c62cca4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ Planner: Add checkbox on considering oxygen narcotic +Planner: Improve rounding of stop durations in planner notes Desktop: register changes when clicking "done" on dive-site edit screen Mobile: re-enable GPS location service icon in global drawer Mobile: add support for editing the dive number of a dive diff --git a/core/plannernotes.c b/core/plannernotes.c index c72ac901a..0bfdbe7d5 100644 --- a/core/plannernotes.c +++ b/core/plannernotes.c @@ -375,7 +375,8 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d } put_string(&buf, "</tr>\n"); newdepth = dp->depth.mm; - lasttime = dp->time; + // Only add the time we actually displayed so rounding errors dont accumulate + lasttime += ((dp->time - lasttime + 30) / 60) * 60; } } if (gaschange_after || gaschange_before) { |