summaryrefslogtreecommitdiffstats
path: root/dive.h
diff options
context:
space:
mode:
Diffstat (limited to 'dive.h')
-rw-r--r--dive.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/dive.h b/dive.h
index 25cad4bfc..7d08828a8 100644
--- a/dive.h
+++ b/dive.h
@@ -215,6 +215,16 @@ static inline int mbar_to_PSI(int mbar)
return to_PSI(p);
}
+static inline int get_o2(const struct gasmix *mix)
+{
+ return mix->o2.permille ? : O2_IN_AIR;
+}
+
+static inline int get_he(const struct gasmix *mix)
+{
+ return mix->he.permille;
+}
+
static inline gboolean is_air(int o2, int he)
{
return (he == 0) && (o2 == 0 || ((o2 >= O2_IN_AIR - 1) && (o2 <= O2_IN_AIR + 1)));