mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Planner: Count the minimum stop time towards o2time
When doing backgas breaks, count the minimum stop time towards o2time. Previously, the initial minimum stop wasn't counted, so the time of the first segment on oxygen was min_switch_duration + 12 minutes. E.g. with 1 minute minimum switch duration. Previously: depth duration runtime gas 40m 1min 1min air 40m 34min 35min 21m 2min 37min 21m 1min 38min EAN50 18m 1min 39min 15m 3min 42min 12m 4min 46min 9m 5min 51min 6m 13min 64min oxygen <--13 minutes on O2 6m 6min 70min air 6m 2min 72min oxygen 0m 1min 73min Now: depth duration runtime gas 40m 1min 1min air 40m 34min 35min 21m 2min 37min 21m 1min 38min EAN50 18m 1min 39min 15m 3min 42min 12m 4min 46min 9m 5min 51min 6m 12min 63min oxygen 6m 6min 69min air 6m 2min 71min oxygen 0m 1min 72min Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4f05622846
commit
90d15c20c4
1 changed files with 4 additions and 0 deletions
|
@ -1121,6 +1121,8 @@ bool plan(struct diveplan *diveplan, char **cached_datap, bool is_planner, bool
|
|||
&displayed_dive.cylinder[current_cylinder].gasmix,
|
||||
prefs.min_switch_duration, po2, &displayed_dive, prefs.decosac);
|
||||
clock += prefs.min_switch_duration;
|
||||
if (prefs.doo2breaks && get_o2(&displayed_dive.cylinder[current_cylinder].gasmix) == 1000)
|
||||
o2time += prefs.min_switch_duration;
|
||||
} else {
|
||||
pendinggaschange = true;
|
||||
}
|
||||
|
@ -1158,6 +1160,8 @@ bool plan(struct diveplan *diveplan, char **cached_datap, bool is_planner, bool
|
|||
&displayed_dive.cylinder[current_cylinder].gasmix,
|
||||
prefs.min_switch_duration, po2, &displayed_dive, prefs.decosac);
|
||||
clock += prefs.min_switch_duration;
|
||||
if (prefs.doo2breaks && get_o2(&displayed_dive.cylinder[current_cylinder].gasmix) == 1000)
|
||||
o2time += prefs.min_switch_duration;
|
||||
pendinggaschange = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue