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:
Dirk Hohndel 2016-02-05 20:45:18 -08:00
parent 7f70802b90
commit 130f4cd7ac
4 changed files with 12 additions and 1 deletions

View file

@ -228,6 +228,7 @@ void DivePlotDataModel::emitDataChanged()
emit dataChanged(QModelIndex(), QModelIndex());
}
#ifndef SUBSURFACE_MOBILE
void DivePlotDataModel::calculateDecompression()
{
struct divecomputer *dc = select_dc(&displayed_dive);
@ -235,3 +236,4 @@ void DivePlotDataModel::calculateDecompression()
calculate_deco_information(&displayed_dive, dc, &pInfo, false);
dataChanged(index(0, CEILING), index(pInfo.nr - 1, TISSUE_16));
}
#endif

View file

@ -83,7 +83,9 @@ public:
double po2Max();
double CCRMax();
void emitDataChanged();
#ifndef SUBSURFACE_MOBILE
void calculateDecompression();
#endif
private:
struct plot_info pInfo;