mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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 <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
14931db0a9
commit
74d13b0554
2 changed files with 12 additions and 13 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue