From 74d13b0554543054033852ee34f315cb9d558bc1 Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Thu, 23 Jan 2020 16:27:41 +0100 Subject: diveplanner: move mobile specific calc to diveplannermodel setBottomSac, setDecoSac and setFactor in diveplannermodel receives display value which are then converted. subsurface-mobile have slightly different values, move the correction of these from plannershared to diveplannermodel, in order to keep the whole convert in one place. Signed-off-by: jan Iversen Signed-off-by: Dirk Hohndel --- backend-shared/plannershared.cpp | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'backend-shared/plannershared.cpp') diff --git a/backend-shared/plannershared.cpp b/backend-shared/plannershared.cpp index c2eb88ea3..df8a76452 100644 --- a/backend-shared/plannershared.cpp +++ b/backend-shared/plannershared.cpp @@ -83,11 +83,6 @@ double plannerShared::bottomsac() } void plannerShared::set_bottomsac(double value) { -#ifdef SUBSURFACE_MOBILE - if (qPrefUnits::volume() == units::CUFT) - value /= 100; // cuft without decimals (0 - 300) -#endif - // NO conversion, this is done in the planner model. DivePlannerPointsModel::instance()->setBottomSac(value); } @@ -104,11 +99,6 @@ double plannerShared::decosac() } void plannerShared::set_decosac(double value) { -#ifdef SUBSURFACE_MOBILE - if (qPrefUnits::volume() == units::CUFT) - value /= 100; // cuft without decimals (0 - 300) -#endif - // NO conversion, this is done in the planner model. DivePlannerPointsModel::instance()->setDecoSac(value); } @@ -124,9 +114,6 @@ double plannerShared::sacfactor() } void plannerShared::set_sacfactor(double value) { -#ifdef SUBSURFACE_MOBILE - value /= 10.0; -#endif // NO conversion, this is done in the planner model. DivePlannerPointsModel::instance()->setSacFactor(value); } -- cgit v1.2.3-70-g09d2