mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: make gas type enum globally available
The deco-routines used an enum to pass around the inert gas type. Make that globally available and make it include O2. This will be used in a future commit to generalize access of gas fractions. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
cd22b86bf8
commit
34730b898b
2 changed files with 3 additions and 2 deletions
|
@ -30,7 +30,6 @@
|
|||
#include "planner.h"
|
||||
#include "qthelper.h"
|
||||
|
||||
enum inertgas { N2, HE };
|
||||
#define cube(x) (x * x * x)
|
||||
|
||||
// Subsurface until v4.6.2 appeared to produce marginally less conservative plans than our benchmarks.
|
||||
|
@ -293,7 +292,7 @@ double tissue_tolerance_calc(struct deco_state *ds, const struct dive *dive, dou
|
|||
/*
|
||||
* Return Buehlmann factor for a particular period and tissue index.
|
||||
*/
|
||||
static double factor(int period_in_seconds, int ci, enum inertgas gas)
|
||||
static double factor(int period_in_seconds, int ci, enum gas_component gas)
|
||||
{
|
||||
if (period_in_seconds == 1) {
|
||||
if (gas == N2)
|
||||
|
|
|
@ -10,6 +10,8 @@ extern "C" {
|
|||
#include <stdbool.h>
|
||||
#endif
|
||||
|
||||
enum gas_component { N2, HE, O2 };
|
||||
|
||||
// o2 == 0 && he == 0 -> air
|
||||
// o2 < 0 -> invalid
|
||||
struct gasmix {
|
||||
|
|
Loading…
Add table
Reference in a new issue