aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2021-01-01 01:30:13 +0100
committerGravatar bstoeger <32835590+bstoeger@users.noreply.github.com>2021-01-01 21:10:10 +0100
commit60999e3a3933919e873337df8a74d9fab26bc2cf (patch)
treedf3e481c72c45b82aaec685dc523a1b352f19508 /core
parent1270d9470129901215fc2173934602d7cd77836f (diff)
downloadsubsurface-60999e3a3933919e873337df8a74d9fab26bc2cf.tar.gz
core: make gasmix_is_invalid globally accessible
The statistics module will use that to bin dives by gasmix. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core')
-rw-r--r--core/gas.c2
-rw-r--r--core/gas.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/core/gas.c b/core/gas.c
index d37b614fb..e62bed1ea 100644
--- a/core/gas.c
+++ b/core/gas.c
@@ -22,7 +22,7 @@ bool isobaric_counterdiffusion(struct gasmix oldgasmix, struct gasmix newgasmix,
return get_he(oldgasmix) > 0 && results->dN2 > 0 && results->dHe < 0 && get_he(oldgasmix) && results->dN2 > 0 && 5 * results->dN2 > -results->dHe;
}
-static bool gasmix_is_invalid(struct gasmix mix)
+bool gasmix_is_invalid(struct gasmix mix)
{
return mix.o2.permille < 0;
}
diff --git a/core/gas.h b/core/gas.h
index 5e0f4675f..cd7c9e389 100644
--- a/core/gas.h
+++ b/core/gas.h
@@ -69,6 +69,7 @@ extern fraction_t get_gas_component_fraction(struct gasmix mix, enum gas_compone
extern void fill_pressures(struct gas_pressures *pressures, double amb_pressure, struct gasmix mix, double po2, enum divemode_t dctype);
extern bool gasmix_is_air(struct gasmix gasmix);
+extern bool gasmix_is_invalid(struct gasmix mix);
extern enum gastype gasmix_to_type(struct gasmix mix);
extern const char *gastype_name(enum gastype type);