mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Do not run the deco calculations in the mobile app
We don't show the calculated ceilings and calculating them is compute intensive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7f70802b90
commit
130f4cd7ac
4 changed files with 12 additions and 1 deletions
|
@ -879,7 +879,9 @@ void DiveReportedCeiling::modelDataChanged(const QModelIndex &topLeft, const QMo
|
||||||
|
|
||||||
void DiveCalculatedCeiling::recalc()
|
void DiveCalculatedCeiling::recalc()
|
||||||
{
|
{
|
||||||
|
#ifndef SUBSURFACE_MOBILE
|
||||||
dataModel->calculateDecompression();
|
dataModel->calculateDecompression();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void DiveCalculatedCeiling::settingsChanged()
|
void DiveCalculatedCeiling::settingsChanged()
|
||||||
|
|
|
@ -228,6 +228,7 @@ void DivePlotDataModel::emitDataChanged()
|
||||||
emit dataChanged(QModelIndex(), QModelIndex());
|
emit dataChanged(QModelIndex(), QModelIndex());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef SUBSURFACE_MOBILE
|
||||||
void DivePlotDataModel::calculateDecompression()
|
void DivePlotDataModel::calculateDecompression()
|
||||||
{
|
{
|
||||||
struct divecomputer *dc = select_dc(&displayed_dive);
|
struct divecomputer *dc = select_dc(&displayed_dive);
|
||||||
|
@ -235,3 +236,4 @@ void DivePlotDataModel::calculateDecompression()
|
||||||
calculate_deco_information(&displayed_dive, dc, &pInfo, false);
|
calculate_deco_information(&displayed_dive, dc, &pInfo, false);
|
||||||
dataChanged(index(0, CEILING), index(pInfo.nr - 1, TISSUE_16));
|
dataChanged(index(0, CEILING), index(pInfo.nr - 1, TISSUE_16));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -83,7 +83,9 @@ public:
|
||||||
double po2Max();
|
double po2Max();
|
||||||
double CCRMax();
|
double CCRMax();
|
||||||
void emitDataChanged();
|
void emitDataChanged();
|
||||||
|
#ifndef SUBSURFACE_MOBILE
|
||||||
void calculateDecompression();
|
void calculateDecompression();
|
||||||
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct plot_info pInfo;
|
struct plot_info pInfo;
|
||||||
|
|
|
@ -854,6 +854,7 @@ static void setup_gas_sensor_pressure(struct dive *dive, struct divecomputer *dc
|
||||||
} while ((secondary = secondary->next) != NULL);
|
} while ((secondary = secondary->next) != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef SUBSURFACE_MOBILE
|
||||||
/* calculate DECO STOP / TTS / NDL */
|
/* calculate DECO STOP / TTS / NDL */
|
||||||
static void calculate_ndl_tts(struct plot_data *entry, struct dive *dive, double surface_pressure)
|
static void calculate_ndl_tts(struct plot_data *entry, struct dive *dive, double surface_pressure)
|
||||||
{
|
{
|
||||||
|
@ -1067,7 +1068,7 @@ void calculate_deco_information(struct dive *dive, struct divecomputer *dc, stru
|
||||||
dump_tissues();
|
dump_tissues();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Function calculate_ccr_po2: This function takes information from one plot_data structure (i.e. one point on
|
/* 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,
|
* the dive profile), containing the oxygen sensor values of a CCR system and, for that plot_data structure,
|
||||||
|
@ -1223,7 +1224,9 @@ static void debug_print_profiledata(struct plot_info *pi)
|
||||||
void create_plot_info_new(struct dive *dive, struct divecomputer *dc, struct plot_info *pi, bool fast)
|
void create_plot_info_new(struct dive *dive, struct divecomputer *dc, struct plot_info *pi, bool fast)
|
||||||
{
|
{
|
||||||
int o2, he, o2max;
|
int o2, he, o2max;
|
||||||
|
#ifndef SUBSURFACE_MOBILE
|
||||||
init_decompression(dive);
|
init_decompression(dive);
|
||||||
|
#endif
|
||||||
/* Create the new plot data */
|
/* Create the new plot data */
|
||||||
free((void *)last_pi_entry_new);
|
free((void *)last_pi_entry_new);
|
||||||
|
|
||||||
|
@ -1251,7 +1254,9 @@ void create_plot_info_new(struct dive *dive, struct divecomputer *dc, struct plo
|
||||||
}
|
}
|
||||||
fill_o2_values(dc, pi, dive); /* .. and insert the O2 sensor data having 0 values. */
|
fill_o2_values(dc, pi, dive); /* .. and insert the O2 sensor data having 0 values. */
|
||||||
calculate_sac(dive, pi); /* Calculate sac */
|
calculate_sac(dive, pi); /* Calculate sac */
|
||||||
|
#ifndef SUBSURFACE_MOBILE
|
||||||
calculate_deco_information(dive, dc, pi, false); /* and ceiling information, using gradient factor values in Preferences) */
|
calculate_deco_information(dive, dc, pi, false); /* and ceiling information, using gradient factor values in Preferences) */
|
||||||
|
#endif
|
||||||
calculate_gas_information_new(dive, pi); /* Calculate gas partial pressures */
|
calculate_gas_information_new(dive, pi); /* Calculate gas partial pressures */
|
||||||
|
|
||||||
#ifdef DEBUG_GAS
|
#ifdef DEBUG_GAS
|
||||||
|
|
Loading…
Add table
Reference in a new issue