mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
dive planner: correct bottomsac/decosac calc.
Move conversion cuft <-> liter from desktop-widget/diveplanner.cpp to plannerShared, to facilitate the same results in mobile diveplanner Use Backend for bottomsac/decosac and update to check for switch LITER <-> CUFT Add bottomsac/decosac to QMLinterface. Signed-off-by: jan Iversen <jan@casacondor.com>
This commit is contained in:
parent
5548376776
commit
cd3c2266f9
6 changed files with 49 additions and 18 deletions
|
@ -145,9 +145,9 @@ void TestPlannerShared::test_gas()
|
|||
|
||||
// Remark return will from qPref is in m / 1000.
|
||||
qPrefDivePlanner::set_bottomsac(2830);
|
||||
QCOMPARE(plannerShared::bottomsac(), 2.83);
|
||||
QCOMPARE(int(plannerShared::bottomsac() * 1000), 99);
|
||||
qPrefDivePlanner::set_bottomsac(16000);
|
||||
QCOMPARE(plannerShared::bottomsac(), 16);
|
||||
QCOMPARE(int(plannerShared::bottomsac() * 1000), 565);
|
||||
|
||||
plannerShared::set_decosac(0.9);
|
||||
QCOMPARE(qPrefDivePlanner::decosac(), 25485);
|
||||
|
@ -156,9 +156,9 @@ void TestPlannerShared::test_gas()
|
|||
|
||||
// Remark return will from qPref is in m / 1000.
|
||||
qPrefDivePlanner::set_decosac(11500);
|
||||
QCOMPARE(plannerShared::decosac(), 11.5);
|
||||
QCOMPARE(int(plannerShared::decosac() * 1000), 406);
|
||||
qPrefDivePlanner::set_decosac(19800);
|
||||
QCOMPARE(plannerShared::decosac(), 19.8);
|
||||
QCOMPARE(int(plannerShared::decosac() * 1000), 699);
|
||||
|
||||
// Remark bottompo2 is in BAR, even though unit system is
|
||||
// Imperial, the desktop version is like that.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue