mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Desktop: Show Warning for Dives with No Viable Cylinders.
Show a warning when a dive is opened / edited and doesn't have any usable cylinders for the selected dive mode (i.e. no open circuit gas for open circuit / PSCR, or no diluent for CCR). Fixes #4413. Reported-by: @kruegerha Signed-off-by: Michael Keller <github@ike.ch>
This commit is contained in:
parent
71ebee8ab6
commit
55a8b9089f
2 changed files with 26 additions and 1 deletions
|
@ -62,8 +62,9 @@ void sanitize_gasmix(struct gasmix &mix)
|
|||
/* Sane mix? */
|
||||
if (o2 <= 1000 && he <= 1000 && o2 + he <= 1000)
|
||||
return;
|
||||
report_info("Odd gasmix: %u O2 %u He", o2, he);
|
||||
|
||||
mix = gasmix_air;
|
||||
report_error("Odd gasmix: %u O2 %u He, switched to air.", o2, he);
|
||||
}
|
||||
|
||||
int gasmix_distance(struct gasmix a, struct gasmix b)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue