3f8b4604be introduced a bug: it replaced alloc_dive_site() by the
divesite constructor. However, the latter does not generate a
UUID (for that it would have to access the dive site table).
Thus newly added dive sites had no UUID and could not be saved
properly.
Use the register_site() instead of the put() function when
adding the dive site to the core, so that the UUID is created
if needed.
This needs an audit.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Our current build for debian trixie (testing) has started failing
because mdbtools-dev seems to be no longer available in trixie.
Not sure what the future plans for mdbtools are - the project itself
seems to be a bit stagnant, so we might need to consider removing this
from builds where the target OS has stopped supporting this tooling (or
change to download and install this library ourselves as part of our
build process.
For now I am adding a build for debian / bookworm to cover debian, and
disabling the debian / trixie build.
Signed-off-by: Michael Keller <github@ike.ch>
It seems to be over the top to hide all compass heading information just
because _some_ dive computers log them for every sample.
A better approach will be to either suppress these in the parser for the
affected dive computer, or let the user suppress them in the
profile if they wish to do so.
Since there is no information in the comments about the manufacturer /
model of the affected dive computer, this is implementing a 'scream
test'.
Signed-off-by: Michael Keller <github@ike.ch>
Make writeToAppLogFile() take an std::string parameter to avoid
an unnecessary UTF8->UTF16->UTF8 (std::string->QString->char *)
roundtrip.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
In commit 4de109bbf1, qDebug() was
replaced with report_info(). As a side effect, the subsurface log
messages are no longer redirected to the application log file. Only the
internal Qt logging ends up in the log file.
For bug reporting by end-users, this application log file is important
because it's the easiest way to collect all the necessary information to
investigate the problem.
Signed-off-by: Jef Driesen <jef@libdivecomputer.org>
The app already supports Mares Sirius,
but user has to allow scanning for
unknown devices in app settings.
This adds Mares Sirius to known devices.
Signed-off-by: rmultan <multan.rafal.k@gmail.com>
Change the builds on push (i.e. pull request merges) to build release
versions. This seems to be the correct way to build these, as they are
now distributed as the official builds on
https://subsurface-divelog.org/.
For users wanting to help with debugging, build artifacts on pull
requests are available, and these are debug builds.
Also adding the option to manually trigger builds, so if needed debug
builds can be run on `master`.
Signed-off-by: Michael Keller <github@ike.ch>
Switch the Divesoft log file importer to use the parser in
libdivecomputer. This adds support for the newer Divesoft Freedom+ log
file format.
Also refactor the OSTCTools log file importer to share common
functionality.
Signed-off-by: Michael Keller <github@ike.ch>
Switch the Divesoft log file importer to use the parser in
libdivecomputer. This adds support for the newer Divesoft Freedom+ log
file format.
Also refactor the OSTCTools log file importer to share common
functionality.
Signed-off-by: Michael Keller <github@ike.ch>
When computing the suggested switch depth for a gas,
we should take the next stop depth above the MOD, i.e.
round down. Otherwise we can produce MOD violation warnings.
We need, however, a bit of fudge as otherwise we do not
suggest to switch to o2 at 6m.
TestPlan uses the MOD to determine the depth to switch to
Tx21/35. This happens to be 65.378m. Therefore, switching
at 66m violates the MOD, the switch should be at 63m.
This then affects the gas usage.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
When computing the variations in a background thread, the
code has to work on a copy of the dive plan and the deco
state. Instead of passing a copy via a unique_ptr<>, simply
use value semantics when calling computeVariations().
This does an unnecessary copy of the deco state, when
computeVariations is not run in the background, but so what.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
In 8704a8b the code in cloneDiveplan() was replaced by a simple
assignment statement.
Alas, the original code was more complex: it copied only up
to a certain point (it stopped at automatically generated
steps).
The new behavior made the calculations of variations fail,
because a call to plan() adds deco stops.
Therefore, copy the plan _before_ calling plan().
Fixes#4368
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
A dive without events could lead to json with extra closing brackets that
prevents browsers from rendering the dive log.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Fix a bug in the edit divesite country command preventing the
country of the divesite from ever being saved.
Fixes#4357.
Signed-off-by: Michael Keller <github@ike.ch>
Previously, the subtitle generation was hardcoded, making it unsuitable
if you didn't want all of the displayed values. This has been replaced
by a format string that is configurable in the settings, using predefined
tags that are replaced with the values. The default value for this has
been set to (mostly) match the currently generated subtitle string. This
also provides a good starting point for users that want to modify the string.
Signed-off-by: Victor Arvidsson <victarv@gmail.com>
When using the current version of Subsurface-mobile, you cannot scroll
the dive details (i.e. you cannot see the bottom of the dive
information, depending on the size of your screen), nor can you scroll
the notes editor.
I'm not sure how I didn't stumble across this earlier, but a git bisect
appears to pinpoint commit a39f0e2891 ("Mobile: Fix QML Warnings.")
which is quite old.
Partially reverting this seems sufficient to get scrolling for the dive
details and dive notes edit working again.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Build in by default if libraw is found, but make it optional for builds
were it's not needed, like smtk2ssrf or subsurface-downloader.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Add scanning and updates of dependencies with Dependabot where this is
possible.
While this isn't currently available for the majority of our code that
is in C / C++, there are some things 'around the edges' where we can
offload some of the dependency management:
- GitHub actions
- docker images
- the gradle build for android
Signed-off-by: Michael Keller <github@ike.ch>