mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 23:43:24 +00:00
Don't do the minimal gaschanging stops during O2 breakting
Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
0f458023d9
commit
c9c90afd3e
1 changed files with 12 additions and 12 deletions
|
@ -930,12 +930,12 @@ bool plan(struct diveplan *diveplan, struct dive *dive, int timestep, struct dec
|
||||||
(get_o2(&gas) + 5) / 10, (get_he(&gas) + 5) / 10, gaschanges[gi].depth / 1000.0);
|
(get_o2(&gas) + 5) / 10, (get_he(&gas) + 5) / 10, gaschanges[gi].depth / 1000.0);
|
||||||
#endif
|
#endif
|
||||||
/* Stop for the minimum duration to switch gas */
|
/* Stop for the minimum duration to switch gas */
|
||||||
add_segment(depth_to_bar(depth, dive),
|
if (!(prefs.doo2breaks && get_o2(&dive->cylinder[current_cylinder].gasmix) == 1000)) {
|
||||||
&dive->cylinder[current_cylinder].gasmix,
|
add_segment(depth_to_bar(depth, dive),
|
||||||
prefs.min_switch_duration, po2, dive, prefs.decosac);
|
&dive->cylinder[current_cylinder].gasmix,
|
||||||
clock += prefs.min_switch_duration;
|
prefs.min_switch_duration, po2, dive, prefs.decosac);
|
||||||
if (prefs.doo2breaks && get_o2(&dive->cylinder[current_cylinder].gasmix) == 1000)
|
clock += prefs.min_switch_duration;
|
||||||
o2time += prefs.min_switch_duration;
|
}
|
||||||
} else {
|
} else {
|
||||||
/* The user has selected the option to switch gas only at required stops.
|
/* The user has selected the option to switch gas only at required stops.
|
||||||
* Remember that we are waiting to switch gas
|
* Remember that we are waiting to switch gas
|
||||||
|
@ -983,12 +983,12 @@ bool plan(struct diveplan *diveplan, struct dive *dive, int timestep, struct dec
|
||||||
(get_o2(&gas) + 5) / 10, (get_he(&gas) + 5) / 10, gaschanges[gi + 1].depth / 1000.0);
|
(get_o2(&gas) + 5) / 10, (get_he(&gas) + 5) / 10, gaschanges[gi + 1].depth / 1000.0);
|
||||||
#endif
|
#endif
|
||||||
/* Stop for the minimum duration to switch gas */
|
/* Stop for the minimum duration to switch gas */
|
||||||
add_segment(depth_to_bar(depth, dive),
|
if (!(prefs.doo2breaks && get_o2(&dive->cylinder[current_cylinder].gasmix) == 1000)) {
|
||||||
&dive->cylinder[current_cylinder].gasmix,
|
add_segment(depth_to_bar(depth, dive),
|
||||||
prefs.min_switch_duration, po2, dive, prefs.decosac);
|
&dive->cylinder[current_cylinder].gasmix,
|
||||||
clock += prefs.min_switch_duration;
|
prefs.min_switch_duration, po2, dive, prefs.decosac);
|
||||||
if (prefs.doo2breaks && get_o2(&dive->cylinder[current_cylinder].gasmix) == 1000)
|
clock += prefs.min_switch_duration;
|
||||||
o2time += prefs.min_switch_duration;
|
}
|
||||||
pendinggaschange = false;
|
pendinggaschange = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue