aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
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>
2018-08-11QML UI: show download page when device was plugged inGravatar Dirk Hohndel
Unless, of course, the user was editing or adding a dive - that would be annoying to have interrupted (even though, of course, it's the user plugging in the device which would trigger this in the first place). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: create separate function to show download pageGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Android: notify the UI a dive computer was plugged inGravatar Dirk Hohndel
And try to guess which one from the device string we get from the Intent. The function is named to indicate its future use (because once the user plugs in such a device, we should show the download page). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: add property to pass detected device name to UIGravatar Dirk Hohndel
If the user plugs in a device on Android we get a device string that should allow us to figure out which dive computer was plugged in. Make that string available to the QML UI. Right now all we do is log it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Android: more FTDI debuggingGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Android: add more verbose logging when trying to open USBGravatar Dirk Hohndel
The goal is to be able to tell what's actually going wrong. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Android: log both for mobile and full appGravatar Dirk Hohndel
We don't usually build the full app on Android, but it's still possible. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Android: add callback from IntentGravatar Dirk Hohndel
Right now all this does is add the device string to the log. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11Android: add Java class to receive IntentsGravatar Dirk Hohndel
We want to be able to respond to a USB device being plugged in. This simply logs the information we get from the device. Sadly the really useful getProductName and getManufacturerName require API level 21 (so Android 5.0 or newer) and we still have a couple hundred users on 4.1-4.4. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-09Allow zero length segments in plannerGravatar Robert C. Helling
Those are needed to indicate bailout or set point switches at the beginning of the ascend. Signed-off-by: Robert C. Helling <helling@atdotde.de>