This matches the strings for a couple of generic events from
libdivecomputer that should obviously info or violation events, and
matches quite a few more from the Uemis downloader (as those are much more
specific).
Everything else is still shown as a yellow warning triangle.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
So far this is only supported in the Suunto EON Steel backend, but we
should try to add this to others where we have such a distinction (and
maybe assign different values to the predefined libdivecomputer events).
This also adds three new icons for info, warning, and violation. The
warning icon we had already, but I drew a new one from scratch to have it
match the violation icon.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This becomes obvious with the new severity bits introduced in the Suunto
EON Steel parser.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When stuck in areas with really bad internet 5 seconds may not be enough,
but making the timeout longer in general seems the wrong way to go. So
keep the default 5 seconds but allow the user to override that with
subsurface --cloud-timeout=NN
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
There are a lot more places all over Subsurface where this needs to be
cleaned up. The converstion of the preferences system has been a complete
mess.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Commit b1ed04a means that DivePlannerPointsModel::rememberTanks() and related
functions and variables are no longer required
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This way they display correctly when accessed from grantlee template
Fixes#1085
Signed-off-by: Tim Wootton <tim@tee-jay.org.uk>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead of having fixed numbers and trying to translate them into
strings, a dive computer could just give us the string directly. Like
the new EON Steel backend does.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The cylinder use field was not merged when dives were merged. This is
normally not noticeable, since hopefully the cylinder use should be the
same anyway, but when re-downloading the dives from the EON Steel after
updating it to also get cylinder use data, the dive merging threw the
data away again since the original dive lacked it.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This uses the extended tank type information to fill in the cylinder use
(OC gas, CC Diluent or CC O2) from libdivecomputer when available.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The imperial and metric unit formats already had this, but the
personalized one missed the newline at the end.
It shouldn't really matter, since it's the last line of the file, but it
is not right.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It makes no sense to keep trying. Maybe we need a UI to force it online
again, but for now this works much better when using cloud storage while
actually offline.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Commit aa1446bed2 ("Make filters work again in master") makes filters
work again for the desktop app, but breaks building Subsurface-mobile.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Since 6cd711a1 filters don't work. This went unnoticed because the
commit wasn't applied on v4.5-branch.
Partially reverting it makes filters work again.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add option to calculate the best mix portion of O2 and He for the dive's max
depth if the user enters * in the MOD and MND cylinder fields. Gas portions
are automatically recalculated if the max depth of the dive changes.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The switch depth of a decompression gas is its MOD. By renaming the heading to
"Deco MOD", it is more clearly distinguished from the bottom MOD, and it is
more obvious how they relate to the Bottom pO2 and Deco pO2 preferences.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Adds fields to the planner cylinder model for maximum operating depth (MOD)
for a bottom mix gas, and maximum narcotic depth (MND). Fields are read/write,
so changing MOD changes %O2 and vice-versa. Changing MND changes %He and
vice-versa.
When setting MOD directly, the %O2 is truncated (rounded down) to an integer,
which re-calculates the MOD, which is sometimes a few metres greater than the
input depth. This is desireable behaviour, as the rounding is conservative.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This fix is reasonably straightforward when the divedatapoint structure stores
the cylinder rather than gasmix.
Fixes#970
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Determining the correct cylinder index from a known gas mix can be
complicated, but it is trivial to look up the gasmix from the cylinder_t
structure.
It makes sense to remember which cylinder is being used. This simplifies
handling changing a cylinder's gas mix, either directly by the user, or
indirectly in the planner. It also permits tracking of multiple cylinders of
the same mix, e.g. independent twins / sidemount.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The minified JavaScript is effectively a binary artifact that we carry in
the repo.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This creates the possibility to pass configuration, where the ndk and
sdk is installed, to the build.sh script via environment variables.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>