aboutsummaryrefslogtreecommitdiffstats
path: root/backend-shared
AgeCommit message (Collapse)Author
2020-01-04backend-shared: add slot to detect switch METER <-> FEETGravatar jan Iversen
This allows to update plannermodel etc. and thus avoiding a restart when changing units for length. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-31backend: correct deco2() problem in plannerSharedGravatar jan Iversen
Divided by 1000 (int) instead of 1000.0 (float) which caused precision problems. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-30backendShared: correct set_verbatim_plan in plannerShared.Gravatar jan Iversen
Correct copy/paste error, set_verbatim_plan() should not call setSacFactor() but setVerbatim(). Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-28planner: correct rating calculations.Gravatar jan Iversen
Test show that the ratings calculations were off by +/- 1, due to rounding errors. Found due to test cases in tests (other commits) The calculations are copied 1-1 from diveplanner.cpp, but are used slightly different in plannerShared.cpp Correct calculations, by securing the calculation is done with float precision and the rounded with lrint(). Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-26plannerShared: add notes variablesGravatar jan Iversen
Add display_runtime display_duration display_transitions verbatim_plan display_variations Get is direct from qPrefDivePlanner and set is plannerModel Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-26desktop-widgets: replace o2narcotic from plannerModel to plannerSharedGravatar jan Iversen
Use plannerShared setter to update o2narcotic. This will also signal the cylindermodel to calculate a new bestmix. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-26plannerShared: add o2narcoticGravatar jan Iversen
Add include of cylinderModel Add o2narcotic the set function is special because it first informs the plannerModel that there is a new value and then ask cylindermodel to calculate a new bestmix Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-26plannerShared: add variables from plannerModelGravatar jan Iversen
the variables are set through set functions in DivePlannerPointsModel, but read via getters from qPrefDivePlanner. Variables: bottomsac decosac problemsolvingtime sacfactor Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-26plannerShared: add variables from plannerModel with conversionGravatar jan Iversen
the variables are set through set functions in DivePlannerPointsModel, but read via getters from qPrefDivePlanner and converted Variables: min_switch_duration Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-26plannerShared: add variables that reference qPrefDivePlannerGravatar jan Iversen
These are simple pass-through functions (normally optimized away by the compiler), and serve to make a consistent backend interface which have a simpler use especially in QML. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-26plannerShared: add variables from plannerModelGravatar jan Iversen
the variables are set through set functions in DivePlannerPointsModel, but read via getters from qPrefDivePlanner. Variables: drop_stone_mode last_stop switch_at_req_stop Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-26plannerShared: add variables that reference qPrefDiveplannerGravatar jan Iversen
These are simple pass-through functions (normally optimized away by the compiler), and serve to make a consistent backend interface which have a simpler use especially in QML. Variables: dobailout Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-26plannerShared: add variables from plannerModelGravatar jan Iversen
the variables are set through set functions in DivePlannerPointsModel, but read via getters from qPrefDivePlanner. Variables: planner_deco_mode reserveGas safetyStop gflow gfhigh vpmb_conservatism Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-24build-system: move plannerShared to backend-sharedGravatar jan Iversen
WARNING: multi directory commit, needed to secure it builds. move the core/plannerShared.* to backend-shared. update CMakeLists.txt to include backend-shared lib in link process. update ios project to reflect new directory Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-24build-system: move exportfuncs to backend-sharedGravatar jan Iversen
WARNING: multi directory commit, needed to secure it builds. move the core/exportfuncs.* to backend-shared. update backend-shared/CMakeLists.txt to generate backend-shared lib update CMakeLists.txt to include backend-shared lib in link process. update ios project to reflect new directory Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-24build-system: add new root dir backend-sharedGravatar jan Iversen
WARNING: multi directory commit, needed to secure it builds. leaving the shared backend sources in core, imposes a severe limitation, that they cannot make use of e.g. qt-models, because that is created after core (first library to be created). The shared backend uses functionality from core and qt-models, so it must be created when those are available and before desktop-widgets or mobile-widgets are created. Make a new root directory "backend-shared" with empty CMakeLists.txt Signed-off-by: Jan Iversen <jan@casacondor.com>