aboutsummaryrefslogtreecommitdiffstats
path: root/core/profile.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-04 17:49:33 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2021-01-10 15:57:39 -0800
commit6add24fe3effde5e9b7900951baf1c42b78679f5 (patch)
treeae924f90bc665d8ced3291b7d2ec03a2b2fca7eb /core/profile.c
parent0a92823af64c76b165ddd2c1bddadd01a5fc6b56 (diff)
downloadsubsurface-6add24fe3effde5e9b7900951baf1c42b78679f5.tar.gz
mobile: enable deco information calculation on mobile
This simply allows us to calculate the information, it doesn't do anything to actually display it, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/profile.c')
-rw-r--r--core/profile.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/core/profile.c b/core/profile.c
index 2670cf03f..e32a4bcd7 100644
--- a/core/profile.c
+++ b/core/profile.c
@@ -909,7 +909,6 @@ static void setup_gas_sensor_pressure(const struct dive *dive, const struct dive
free(last);
}
-#ifndef SUBSURFACE_MOBILE
/* calculate DECO STOP / TTS / NDL */
static void calculate_ndl_tts(struct deco_state *ds, const struct dive *dive, struct plot_data *entry, struct gasmix gasmix, double surface_pressure,enum divemode_t divemode)
{
@@ -1184,7 +1183,7 @@ static void calculate_deco_information(struct deco_state *ds, const struct deco_
#endif
unlock_planner();
}
-#endif
+
/* Function calculate_ccr_po2: This function takes information from one plot_data structure (i.e. one point on
* the dive profile), containing the oxygen sensor values of a CCR system and, for that plot_data structure,
@@ -1359,12 +1358,8 @@ void init_plot_info(struct plot_info *pi)
void create_plot_info_new(struct dive *dive, struct divecomputer *dc, struct plot_info *pi, bool fast, const struct deco_state *planner_ds)
{
int o2, he, o2max;
-#ifndef SUBSURFACE_MOBILE
struct deco_state plot_deco_state;
init_decompression(&plot_deco_state, dive);
-#else
- UNUSED(planner_ds);
-#endif
free_plot_info_data(pi);
calculate_max_limits_new(dive, dc, pi, planner_ds != NULL);
get_dive_gas(dive, &o2, &he, &o2max);
@@ -1389,9 +1384,9 @@ void create_plot_info_new(struct dive *dive, struct divecomputer *dc, struct plo
}
fill_o2_values(dive, dc, pi); /* .. and insert the O2 sensor data having 0 values. */
calculate_sac(dive, dc, pi); /* Calculate sac */
-#ifndef SUBSURFACE_MOBILE
+
calculate_deco_information(&plot_deco_state, planner_ds, dive, dc, pi, false); /* and ceiling information, using gradient factor values in Preferences) */
-#endif
+
calculate_gas_information_new(dive, dc, pi); /* Calculate gas partial pressures */
#ifdef DEBUG_GAS