Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
setBuehlmann is really planner_deco_mode = BUEHLMANN, change to
ensure consistency.
Signed-off-by: Jan Iversen <jani@apache.org>
|
|
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>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
|
|
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>
|
|
All the changes to multi cylinder editing broke the option to add a new dive.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
|
|
Cylinder init should return all cylinders not only the ones present in the logbook.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
|
|
Save start and end pressures for used cylinders.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
|
|
Return all pressure values for all used cylinders as a list.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
|
|
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>
|
|
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
|
|
Planning ahead for full edit capabilities of dives that uses multiple cylinders.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
|
|
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>
|
|
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>
|
|
Display all used cylinders as a comma separated list.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
|
|
Planning ahead for full edit capabilities of dives that uses multiple cylinders.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
|
|
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>
|
|
Thanks to Lubomir for the review.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
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>
|
|
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>
|
|
And then use that to check for pending Intents on Android.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
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>
|
|
We aren't sure if this is Aqualung specific or generic.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
We don't know for sure if this is Aqualung specific, though.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
As we clear all the pages from the stack, we can briefly have no valid currentItem.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
We do support download from USB devices like the Atomic Aquatics Cobalt.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
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>
|
|
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>
|
|
No need to qualify our own object name.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
This is one of the dive computers that we simply connect to as USB device.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
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>
|
|
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>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
This will allow us to programatically set the connection in the QML UI.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
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>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
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>
|
|
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>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
The goal is to be able to tell what's actually going wrong.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
We don't usually build the full app on Android, but it's still possible.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Right now all this does is add the device string to the log.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
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>
|
|
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>
|