Age | Commit message (Collapse) | Author |
|
Signed-off-by: Tim Segers <tsegers@pm.me>
|
|
Match subsurface-desktop's invalid dive behavior
Signed-off-by: Tim Segers <tsegers@pm.me>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Air is a special gas that does not contain oxygen according
to gasmix.o2.fraction. If you want to use the fo2, you
need to use get_o2() to treat this special case correctly.
This fixes a bug when setting the MND of a gas containing
21% oxygen when o2 is considered not narcotic.
Reported-by: Christoph Gruen <gruen.christoph@gmail.com>
Signed-off-by: Robert C. Helling <helling@atdotde.de>
|
|
In commit 105b60389c ("mobile: remove GpsLocation reference from qmlmanager") I
was a bit careless with the code removal and unintentionally also removed the
initialization of the progress callback. With this change the updates from the
download process are once again shown on screen in the mobile app.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
This has led to broken XML files, don't do it.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|
|
When we found an invalid sensor (referring to a non
existing cylinder) in fixup_dive() the sensor-id was
set to NO_SENSOR.
This led to invalid XML files, because the code decides
to switch into legacy mode. However, there are two
pressure readings, which is invalid in legacy mode.
Therefore, also clear the pressure data.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|
|
We already have a function to select all supported image formats. Let's
just use that.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
The camera sync feature has been moved above the Ok and Cancel buttons
and given its own descriptive header. The checkbox to ignore unaligned
image timestamps has been moved closer to the buttons.
Signed-off-by: Tim Segers <tsegers@pm.me>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
The QTimeEdit field is severely limited when it comes to the supported
time range. By coding our own input / validation we can allow far larger
time shifts. For simplicity, this always assumes hours:minutes format.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
When using the camera sync feature to sync media to the dive timeline,
the calculated time difference was considered invalid if it was more
than 24 hours.
To prevent this, this commit disables the manual time offset input
fields when the camera sync button is clicked. It then uses the epoch
difference in the final offset calculation, enabling arbitrary time
differences between camera and divecomputer.
Signed-off-by: Tim Segers <tsegers@pm.me>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Fixes CID 373231
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
This tries to make our fingerprinting code work better, by avoiding
using the "deviceid" field that has always been unreliable because we've
calculated it multiple different ways, and even for the same version of
subsurface, it ends up changing in the middle (ie we calculate one value
initially, then re-calculate it when we have a proper serial number
string).
So instead, the fingerprinting code will look up and save the
fingerprint file using purely "stable" information that is available
early during the download:
- the device model name (which is a string with vendor and product name
separated by a space)
- the DC_EVENT_DEVINFO 32-bit 'serial' number (which is not necessarily
a real serial number at all, but hopefully at least a unique number
for the particular product)
but because the model name is not necessarily a good filename (think
slashes and other possibly invalid characters), we hash that model name
and use the resulting hex number in the fingerprint file name.
This way the fingerprint file is unambiguous at load and save time, and
depends purely on libdivecomputer data.
But because we also need to verify that we have the actual _dive_
associated with that fingerprint, we also need to save the final
deviceid and diveid when saving the fingerprint file, so that when we
load it again we can look up the dive and verify that we have it before
we use the fingerprint data.
To do that, the fingerprint file itself contains not just the
fingerprint data from libdivecomputer, but the last 8 bytes of the file
are the (subsurface) deviceid and the diveid of the dive that is
associated with the fingerprint.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Kirigami sources are now under 3rdparty.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
That seems to be the way to force it to not request FINE_LOCATION or GPS access.
If I leave this on 'auto' then the dependency on QtPositioning (for showing the
map) appears enough for it to claim access to GPS location. I no longer want
to deal with the Google Play police for that.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Including the related tests.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Only used in context of acquiring GPS locations with the mobile app, which
we no longer do.
Keep the DiveAndLocation structure around as that's needed by the
ApplyGpsFixes command.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
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 is only needed to show the list of GPS fixes obtained with
the now removed location service.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Since we no longer access the device location, we can't do that any longer,
either.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
This was never functional.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Given the nonsense that Google and Apple makes us go through in order to
support this feature, it's time to cut our losses and walk away.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Josh Torres <torres.josh.j@gmail.com>
|
|
When viewing dives on mobile the notes field does not support rich
text. User formatting, output from the planning feature, etc will
render html as plain text.
Adding qml tag to support rich text
Signed-off-by: Josh Torres <torres.josh.j@gmail.com>
|
|
Signed-off-by: Josh Torres <torres.josh.j@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
In commit 4724c88 get_plot_details_new was updated to pass an index
instead of the entry into plot_string. This means we are passing "i" to
plot_string after the final increment of the for loop, instead of
getting the entry[i] within the loop before the final increment. This
means if we are mousing over the far right of the graph, where the time
based break is not hit, we will end up passing an index equal to nr-2
instead of nr-3, which is intended to shave off the final two rows
containing data not useful to the display.
There are a handful of ways to fix this. This commit intends to be
consistent with stylistic choices made elsewhere in the project.
Signed-off-by: Josh Torres <torres.josh.j@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Removal of a cylinder requires a renumbering of
cylinders in the core data structures (samples, etc.).
The renumbering was performed in the undo-action of
cylinder removal, but not during actual cylinder removal.
What a mess!
Add the missing call.
Attention: this makes the deletion of sensor-readings
on cylinder-deletion non-undoable!
Undo will have to be fixed in upcoming commits.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|
|
This makes the sensors pointless and in the future, they
will be removed.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|
|
We want to prevent the user from accidentally deleting a
cylinder with sensor readings. Therefore, we need such a
function.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|
|
Due to changes in the handling of sensor-ids, invalid XMLs were
generated. In particular, these contained duplicate attributes
in the sample tags.
Even though these files shouldn't exist, let's try to parse
them anyway. Some data will be lost, but that's better than
not opening the file.
libxml2 can be told to try to recover from such petty(?) errors
by passing the XML_PARSE_RECOVER flag.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Prior to this change, we had two different cylinder lists as models for
drop down boxes - one that prepends the "no default cylinder" entry
(which we need for setting up no default cylinder to be used in the
app), and another one that only includes actual cylinders.
The problem occured if a dive is created before the first time we edit
an existing dive: in this case we are applying indices across the two
models, but the indices are of course off by one; this results in
actually picking the wrong cylinder. So each time we try to edit a dive,
we end up with the previous cylinder in the list.
This commit simplifies the code by having only one place where we create
list of cylinder names (which is then used as the model for the combo
box). It also uses more logical names for the two 'flavors' of this list
to make it clear which one is supposed to be used (the regular list when
editing or adding dives, the one with the "no default cylinder" entry
prependet for the Settings page).
Reported-by: Brian Fransen
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
- add string serial numbers for Suunto Vyper and Mares IconHD type dive computers
- add support for Cressi Neon
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|
|
Add support for new gas change data from EON Steel with FW 2.5
Fixes #3254
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
|