mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-17 20:36:15 +00:00
If we have defined a gas, default to that one.
If we start to define a gas, we should use that one by default instead of air. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
01e3210725
commit
f96ea9cc9a
1 changed files with 6 additions and 0 deletions
|
@ -1200,6 +1200,12 @@ int DivePlannerPointsModel::addStop(int milimeters, int seconds, int o2, int he,
|
|||
} else if (seconds == 0 && milimeters == 0 && row == 0) {
|
||||
milimeters = M_OR_FT(5, 15); // 5m / 15ft
|
||||
seconds = 600; // 10 min
|
||||
//Default to the first defined gas, if we got one.
|
||||
cylinder_t *cyl = &stagingDive->cylinder[0];
|
||||
if (cyl) {
|
||||
o2 = cyl->gasmix.o2.permille;
|
||||
he = cyl->gasmix.he.permille;
|
||||
}
|
||||
}
|
||||
if (o2 != -1)
|
||||
if (!addGas(o2, he))
|
||||
|
|
Loading…
Add table
Reference in a new issue