mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Use get_o2() and get_he() instead of accessing permilles directly
This gets rid of problems with air. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c86d055db7
commit
04b6b6aaf9
5 changed files with 53 additions and 40 deletions
3
dive.h
3
dive.h
|
@ -91,6 +91,9 @@ static inline int get_he(const struct gasmix *mix)
|
|||
return mix->he.permille;
|
||||
}
|
||||
|
||||
extern void sanitize_gasmix(struct gasmix *mix);
|
||||
extern int gasmix_distance(const struct gasmix *a, const struct gasmix *b);
|
||||
|
||||
static inline bool is_air(int o2, int he)
|
||||
{
|
||||
return (he == 0) && (o2 == 0 || ((o2 >= O2_IN_AIR - 1) && (o2 <= O2_IN_AIR + 1)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue