summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-08-12Use hex USB VID/PIDGravatar Dirk Hohndel
Except of course that the Android intent does give us these values in decimal. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-12tests: add LocationService qml test casesGravatar jan Iversen
Add tst_qPrefLocationService qml file to test C++ qml connection Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12tests: move LocationService test from testpreferencesGravatar jan Iversen
Remove LocationService test in testpreferences add the same LocationService tests to testqPrefLocationService Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12tests: add qPrefLocationService testcasesGravatar jan Iversen
add test cases to secure struct preferences and qPrefLocationService work together Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12core: activate qPrefLocationServiceGravatar jan Iversen
remove LocationService from SettingsObjectWrapper and reference qPrefLocationService update files using SettingsObjectWrapper/LocationService to use qPrefLocationService this activated qPrefLocationService and removed the similar class from SettingsObjectWrapper. Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12core: create qPrefLocationService from SettingsObjectWrapperGravatar jan Iversen
Update set/get functions to follow common name scheme: - get function have same name as in struct prefs - set function have set_<name> - signal function have <name>_changed one class one .h/.cpp is the C++ idiom. Having load/sync of each variable in 1 functions (in contrast to the distributed way SettingsObjectWrapper handles it) secures the same storage name is used. Having the set/get/load/sync functions grouped together makes it easier to get an overview. REMARK: this commit only defines the class, it is not active in production Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12tests: add TechnicalDetails qml test casesGravatar jan Iversen
Add tst_qPrefTechnicalDetails qml file to test C++ qml connection (needs to enhanced later, due to enum) Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12tests: move TechnicalDetails test from testpreferencesGravatar jan Iversen
Remove TechnicalDetails test in testpreferences add the same TechnicalDetails tests to testqPrefTechnicalDetails Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12tests: add qPrefTechincalDetails testcasesGravatar jan Iversen
add test cases to secure struct preferences and qPrefTechnicalDetails work together Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12core: activate qPrefTechnicalDetailsGravatar jan Iversen
remove TechnicalDetails from SettingsObjectWrapper and reference qPrefTechnicalDetails update files using SettingsObjectWrapper/TechnicalDetails to use qPrefTechnicalDetails this activated qPrefTechnicalDetails and removed the similar class from SettingsObjectWrapper. Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12core: create qPrefTechnicalDetails from SettingsObjectWrapperGravatar jan Iversen
Update set/get functions to follow common name scheme: - get function have same name as in struct diveComputer - set function have set_<name> - signal function have <name>_changed one class one .h/.cpp is the C++ idiom. Having load/sync of each variable in 1 functions (in contrast to the distributed way SettingsObjectWrapper handles it) secures the same storage name is used. Having the set/get/load/sync functions grouped together makes it easier to get an overview. REMARK: this commit only defines the class, it is not active in production Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12core: SettingsObjectWrapper remove buehlmann propertyGravatar jan Iversen
remove buehlmann(), setBuehlmann(bool) buehlmann() is really planner_deco_mode == BUEHLMANN, so no need for a function setBuehlmann is dangerous, because buehlmann is saved on disk, but not in prefs.* and thus can lead to inconsistency between bool buehlmann and planner_deco_moce. Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12desktop_widget: preferences_graph, replace setBuehlmannGravatar jan Iversen
setBuehlmann is really planner_deco_mode = BUEHLMANN, change to ensure consistency. Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-12core: qPrefDivePlanner, cleanup SettingsObjectWrapperGravatar jan Iversen
Remove individual store to disk for divePlanner in SettingsObjectWrapper The save was double effect, qPrefDivePlanner::instance()->sync(), which was preciding already do this. Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-11Add Android changes to CHANGELOGGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Android: recognize OSTC 2N when plugged inGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Update CHANGELOG.mdGravatar Joakim Bygdell
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11Mobile: fix saving new diveGravatar Jocke
With the new setup we need to know which state we are coming from when we are saving cylinder related info. When we are adding a new dive we explicitly should save cylinder data to the first cylinder. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11Mobile: fix adding new diveGravatar Jocke
All the changes to multi cylinder editing broke the option to add a new dive. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11QlmManager: fix cylinderInitGravatar Jocke
Cylinder init should return all cylinders not only the ones present in the logbook. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11Mobile: save pressuresGravatar Jocke
Save start and end pressures for used cylinders. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11Mobile: return pressures for all used cylindersGravatar Jocke
Return all pressure values for all used cylinders as a list. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11Mobile: save gasmixesGravatar Jocke
Same as for cylinder info, we need to make sure that the gasmixes gets saved to the correct cylinder. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11Mobile: display all used gases on the edit pageGravatar Jocke
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11Mobile: return all used gasmixes as a listGravatar Jocke
Planning ahead for full edit capabilities of dives that uses multiple cylinders. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11Mobile: save edited cylindersGravatar Jocke
Save the edited cylinder in the correct slot. Since the cylinder number and the used cylinder number need not be the same we first need to test if the cylinder are used. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11Mobile: Display used cylinders on edit pageGravatar Jocke
This displays the used cylinders in a dive so that they can be edited. Currently limited to 5 as a POC. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11Mobile: display all used cylindersGravatar Jocke
Display all used cylinders as a comma separated list. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11Mobile: return all used cylinders as a listGravatar Jocke
Planning ahead for full edit capabilities of dives that uses multiple cylinders. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11FTDI support: list PIDs in decimal everywhereGravatar Dirk Hohndel
This makes it easier if we ever add one to make sure we find all the places those need to be changed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Whitespace cleanup, extra braces, and null checksGravatar Dirk Hohndel
Thanks to Lubomir for the review. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Android: fix typo in OSTC3 FTDI device nameGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Android: fix function signature in java codeGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: don't overwrite good info with badGravatar Dirk Hohndel
If we don't know the vendor or product, let's not overwrite information that we may have remembered from the last time the user downloaded from this dive computer. Note that this doesn't try to associate a specific cable with the information used last time. We could be smarter here for people who have multiple dive computers, but for the most typical user with just one dive computer, this does seem like a good solution. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Android: only handle Intents after the app is initializedGravatar Dirk Hohndel
The old code happened to work because this function only got called if the app was already running, but the correct thing to do is to always wait until we have first called back from C++ code, indicating that the app is indeed fully initialized. This way we only process the Intent in one place in the Java code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: add callback to run after app is fully initializedGravatar Dirk Hohndel
And then use that to check for pending Intents on Android. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Android: add callback to Java code to check pending IntentsGravatar Dirk Hohndel
If we get launched by an intent, we need to delay processing that Intent until after the app is initialized. This is the helper function we'll use for that. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: add another product ID to recognized FTDI cablesGravatar Dirk Hohndel
We aren't sure if this is Aqualung specific or generic. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Android: add another FTDI product id to recognized IDsGravatar Dirk Hohndel
We don't know for sure if this is Aqualung specific, though. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: don't show bogus warning if page stack is resetGravatar Dirk Hohndel
As we clear all the pages from the stack, we can briefly have no valid currentItem. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Android: don't assume that non-BT means FTDI on AndroidGravatar Dirk Hohndel
We do support download from USB devices like the Atomic Aquatics Cobalt. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11core: remove confusing information from debug messageGravatar Dirk Hohndel
This always looked like a thread number and really made no sense since we had a much more informative debug message just a couple lines above. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: don't mangle 'USB device' as device nameGravatar Dirk Hohndel
We do strip the user friendly name from BT addresses and this mistakenly mangled 'USB device' to 'device'. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: directly access currentTextGravatar Dirk Hohndel
No need to qualify our own object name. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: disable connection selection for Atomics AquaticsGravatar Dirk Hohndel
This is one of the dive computers that we simply connect to as USB device. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: pass the indices for the combo boxes on the downloadpage to UIGravatar Dirk Hohndel
Parse the device string and try to figure out what was plugged in. In some cases we know exactly which vendor and product was plugged in, in other cases we only know which vendor it was, in some cases we don't even know that (if all we see is a generic FTDI cable). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: when triggering download page, set up vendor/product/connectionGravatar Dirk Hohndel
This only works if the USB device contains enough information to do so. We need to collect more information to understand what information we get if those get plugged in. Maybe we'll get only the vendor and need to leave it to the user to set the product (which we can do by passing an index of -1 for product). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: set indices when showing Download pageGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: expose vendor/product/connection index as propertiesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11core: add indexOf member to ConnectionListModelGravatar Dirk Hohndel
This will allow us to programatically set the connection in the QML UI. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>