mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
diveplanner: adjust sac-factor calculation.
The real values are 1.0 to 10.0, but QML needs int so mobile gets values 10.0 to 100.0 add sacfactor() to QMLInterface and update QML. Signed-off-by: jan Iversen <jan@casacondor.com>
This commit is contained in:
parent
cd3c2266f9
commit
86fd49f2d7
4 changed files with 27 additions and 16 deletions
|
@ -105,10 +105,18 @@ void plannerShared::set_decosac(double value)
|
|||
|
||||
double plannerShared::sacfactor()
|
||||
{
|
||||
return qPrefDivePlanner::sacfactor() / 100.0;
|
||||
return qPrefDivePlanner::sacfactor() /
|
||||
#ifdef SUBSURFACE_MOBILE
|
||||
10.0;
|
||||
#else
|
||||
100.0;
|
||||
#endif
|
||||
}
|
||||
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