planning: Add option to have last stop at 6m/20ft

When diving in areas where there are risk of boats passing above you,
its common practise to do the last stop at 6m to better stay out of
harms way. When doing o2-deco, it doesn't matter for the deco time if
you are doing all the time at 6m, due to that you don't have any inert
gas in your breathing gas.

This code is a reintroduction of 0b8462bd lost somehow between
a70a8898..8fae0031

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Anton Lundin 2013-05-02 20:35:21 +02:00 committed by Dirk Hohndel
parent 587856d786
commit 935af9e8af
3 changed files with 30 additions and 0 deletions

View file

@ -47,6 +47,14 @@ void dump_plan(struct diveplan *diveplan)
}
#endif
void set_last_stop(gboolean last_stop_6m)
{
if (last_stop_6m == TRUE)
decostoplevels[1] = 6000;
else
decostoplevels[1] = 3000;
}
void get_gas_from_events(struct divecomputer *dc, int time, int *o2, int *he)
{
struct event *event = dc->events;