It's a mamber of the cloud storage authentication class, used to hold the
proposed new password until the backend has accepted it.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Commit f5b11daffd changed gasmix
arguments and return values to be passed by value instead of
using pointers.
Notably, get_gasmix() is fed a default-value and returns a
new value. In the old code, NULL was passed in in a first
loop iteration and non-NULL was always returned in the first
iteration. Thus, an equality comparison of passed-in an
returned gasmix would always fail in the first loop iteration.
The new code passed in air as default. Now if air was also
returned, then the matching gases were not calculated in
calculate_sac(). To revert to the old behavior, pass in
an invalid gasmix.
Moreover, give names to the invalid and air gasmixes.
Reported-by: tormento <turment@gmail.com>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This is the first commit related to the removal of the GPS
webservice. It is nothing more then removing 2 buttons from the
menu to upload and download from the server, so technically
a trivial change.
As with the desktop application: Be very careful here as this
forces our users to use Subsurface-mobile, and a online cloud
account as that is the way to transfer GPS data from a mobile
device to the desktop.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
In commit d815e0c947 ("Parse: pass dive_table argument to parse_file()")
a syntax error was introduced and never caught since we don't test compile
export-html on Travis.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use correct format, create script to update the version and release date in the
appdata.
[Dirk Hohndel: call said script during the build process]
Signed-off-by: Alexander Wilms <f.alexander.wilms@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Actually remove the Subsurface webservice UI from the source, and
deal with all the fallout.
Notice that a part of the change in subsurfacewebservices.cpp is
a block of code that becomes unused, but might contain some valid
logic to be used later. Very similar code is in core/gpslocation.cpp.
And as I earlier broke something here, the unused code is ifdef-ed for
now.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
The very first part of the full removal of the GPS webservice. This
removes the UI artefacts and a tiny bit fallout. This leaves in place
all the background processing.
Be very careful here as this can break workflow of users that currently
have unapplied GPS coordinates sitting in the webservice, and do upgrade
to the version where this commit goes in. They have no clean UI way any more
to apply those GPS fixes from the desktop.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
These are Deco N2 Low/High and Deco He Low/High events. They all appear
to be recorded at the same time, different events at same second.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Measured He is documented (in comment). Will need information if all
measurements are needed or just start/end. First case would be added to
dive prifle, possibly cluttering it, second would be extra data.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This will record the ending battery status to extra data. Would need
info from CCR divers whether this suffices or if we should record also
the starting volatage or even every single reading.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
The shadow variable causes properties only to be saved when
actual changed, therefore some test cases need update
Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add a variable reflecting the current_state to all DISK_* macros, in order to
check if the original variable in struct preferences is changed.
Only save to disk if actually changed
[Dirk Hohndel: merged Jan's commit and renamed the variable and adjusted the
commit message... but fundamentally the commit is still what Jan
wrote, so he should get the credit]
Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We had a couple of instances of names being incorrectly merged with their
group, this should handle that better. It's a bit of a big hammer to use, but
it seems to work (and it makes it easy to then git grep for cases that don't
use the new helper function.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
These were pointers into the global prefs object. The user must
not use these to modify the settings, therefore make them
pointers-to-const.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
get_units() returns a pointer to the units struct in the preferences.
Callers should not modify the preferences via this struct, therefore
make the return value point to const.
This is a small step in constifying the global preferences structure.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
subsurface_webservice_uid ends up in the wrong group due missing
/. Notice that this does not fix the issues I mentioned in #1648.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
We had a special-case for the Shearwater case, let's just make it
slightly more generic and add Garmin to the list of vendors that want a
random BLE address rather than a static one.
The Bluez model of having to state this explicitly - but not giving the
information to the user - is completely broken and this is all very
annoying, credit goes to Wojciech Więckowski for pointing this out.
Of course, right now we don't actually know how to parse the BLE stream
from the Garmin Descent, but with this (and some libdivecomputer
hackery) I actually get connected and start receiving data. That we
then can't parse, but that's hopefully just a libdivecomputer update
away.
Pointed-out-by: Wojciech Więckowski <xplwowi@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When installing for the first time cloudCredentials needs to be added,
this commit a problem with updating them correctly
this problem was caused by
da6e8a4cd5
Signed-off-by: Jan Iversen <jani@apache.org>
And add a fuction to parse tables that are not "relational", meaning
tables which are directly refered from Dives table.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
We can allocate fixed size arrays for smartrak tables as its size can
be known in advance. Simply reading table->num_rows is too dangereous
as smartrak tables have "holes" commonly. This is, they can look like:
Idx | Txt
1 | blablabla
2 | blebleble
4 | blobloblo
table->num_rows would give us 3, but we need to allocate 4 to get an
array like:
|0|blablabla |1|blebleble |2| |3|blobloblo
as the idea is to use the table index to reference the array data.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Dirk Hohndel (4):
garmin: ignore FIT files that aren't dives
garmin: extract the devinfo from the first FIT file we parse
garmin: adjust the model to reflect the FIT product code
Garmin: don't assume that the first device index is 0
Linus Torvalds (5):
Add support for DC_SAMPLE_TTS - time to surface in seconds
Garmin: add DC_SAMPLE_CNS reporting
garmin: don't suppress the time sample at zero time
garmin: start decoding notifications and gas change events
garmin: improve on debug log output for unknown fields
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In a previous commit all override-modifiers were thrown out owing
to warning floods caused by the inconsistent-missing-override
flag on clang.
Re-adding overrides is now very painful because it's an all-or-nothing
thing. Let's disable the warning for now. If we reastablished good
coverage with override, we might think about re-enabling the warning.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
That just means that we're not in deco, the same way as giving a nonzero
NDL value does. But if you don't have NDL, this is a much more
convenient way of saying "not in deco".
The Garmin Descent gives us stop information, but not necessarily NDL,
and really wants this.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
libdivecomputer didn't use to have a TTS sample value, but we're adding
one, so add conditional support for it if it exists.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Writing logs to the path where the executable is located,
might not be possible if the current user doesn't have
permissions to write there.
Obtain the user path and write the log files to the
user path instead - e.g.:
c:\users\myuser\appdata\roaming\subsurface\subsurface_*.log
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Modify the funcion system_default_path_append() to
both receive and return wchar_t types.
Remove fallback in system_default_path_append()
as this is now redundant.
Add a function utf16_to_utf8() and use that
in places where system_default_path_append() needs
to be converted to utf8.
Move both utf16_to_utf8*() and utf8_to_utf16*()
near the top of the file.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
If we don't auto-detect where the Garmin Descent is mounted, the user
can either just type in the correct path, or can use a file diealog to
specify it.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>