To compute the heatmap value, we need the current gasmix but
the current cylinderindex is no longer available.
Fixes#562
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Robert C. Helling <helling@atdotde.de>
The new SHA for Kirigami did all kinds of nasty things to our DiveList.
This commit tries to repair most of the damage. Nothing more than
some margins, anchors, and even a font that changed.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Commit 8f6827ab12 brought a new SHA for Kirigami, but that introduces
a very noisy logging of "Kirigami.Label is deprecated. Use
QtQuickControls2.Label instead".
So, thats what done here.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
First, obviously, I could have squashed this small commit into
the previous one, but I explicly decided not to. It shows
the fragility of all this credential processing code, and
the complex flow control troughout the code.
Testing on a brand new install, and immediately going for
a no cloud setup, the PIN screen was shown, instead of an
empty divelist. Looking at this small code change shows why.
In case of a no cloud situation, there is no PIN to verify
(or email and passwd rules checked). So just do not force us
there.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Before this change, there was only one way to create the local
no cloud repo on the device. The user needed to add at least
one dive to the no cloud account (so that there is something
to save). While this worked in some scenarios, it could also
get things in an inconsistent state: credential status = CS_NOCLOUD
but no local repo. This was a dead end.
In this commit, the creation of the no cloud repo is made more
explicit. When asking for no cloud mode, just create an (empty)
repo for it when it does not yet exist, and otherwise, just
open the existing (possibly empty) repo.
Now, a user can have no cloud repo, next to (any number of)
cloud accounts.
This leaves one functional aspect left: how does a user abandon
the no cloud repo, by merging his data into a true cloud
account. This is code for this, that tries to do this merge in
a smart way. This seems to be broken (too). To be clear: this
is no part of this commit.
Fixes: #667
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
For the geo references tags update the following:
- Nicer look w/o "Tags:" text and brackets when inside location UI
- Translation for "Tags:"
- Warning message when no dive site layout categories are set
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Connect finished signal of download thread only once in constructor of
DownloadFromDCWidget instead of every time the Download / Cancel / Retry
button is clicked.
Fixes minor nuisance: On repeated download attempts multiple massage
boxes were shown.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Tidy up the code which creates the first sample for time = 0 to make
clear that the info for this does NOT come from the first planner point (dp).
No functional change.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
In the planner when a dive is created from the diveplan every first
sample with a new gas shouldn't have a pressure value added.
Otherwise the interpolation code for the pressure graph in the profile
will draw the pressure graph incorrectly.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Up to now the cylinder for gas breaks was hardcoded to first cylinder.
With this change the best_first_ascend_cylinder is used if its
O2 is <=32%.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
When calculating the dive plan in the planner don't accidently use
another gas with same gasmix instead of the gas stored as
"best_first_ascend_gas".
This is important if you have e.g. a bottom stage and back gas with
same gas mix because then you always want to start your ascent with
the gas you used in last entered dive planner point.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
In the planner it is best practise to start the dive with the first
gas in the gaslist. Otherwise one would get a gaschange event at the
very beginning of a dive.
This change implements the following feature:
Automatically move a gas to position 0 in the gaslist if the user selects
this gas for the first dive data point.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
In the planner if one adds two or more cylinders with the same gasmix
(e.g. back gas and bottom stage 18/45) the drop down and data in the
used gas column of the planner points table will be filled with a more
verbose string mentioning also the cyl number and the cyl type
description.
Makes it easier in such a case to select the right cylinder.
Introduces also a helper function which tells you if there is another
cylinder with the same gasmix as the provided cylinder.
This also has an option if it should consider unused cylinders or not.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Be even more restrictive regarding which cylinders can be removed from
the cylinder table in the planner.
Only if a cyliner is not used in the planned part of the dive
it can be removed.
It doesn't matter if there is another cylinder with same gasmix.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
With an OTA adapter - sadly I can't test that. This driver opens a
specific USB device and will ignore the connection settings. It would be
better to get some visual feedback for that (in the QML UI), but I'll
leave that until this has been verified to work.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It can be difficult to distinguish the new marker
which is added on the map and has to be dragged
when editing a new dive location.
By adding a new grayed-out marker it becomes
possible to gray out all other markers, while
the current marker which is being edited is still
bright red.
Suggested-by: Dietrich Meyer <dietrich@sunnynames.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
The QML map uses MapItemView. MapItemView needs a delagate
in the form of a MapQuickItem. The MapQuickItem needs a
'sourceItem' which would be used as the visual (e.g. marker)
on the map.
If the root sourceItem is of type Item, the marker becomes
non-clickable. If the root sourceItem is an Image, the clicks
work.
This patch removes the root Item, which makes the code
less organized, but at the same time it fixes the bug.
Bug reproduced on the following Qt versions on Ubuntu:
5.5.x, 5.7.x
Bug cannot be reproduced on Qt 5.9.x on Windows.
Reported-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
I don't think we need all the versions, but it shouldn't hurt.
Now they are alphabetical, that should make it easier.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit implements possible switching BT on and off during a session,
so not needing a restart of the app when the user forgot to switch
it on when starting the app.
For this, the following needed to be done: 1) create a handler that
reacts on local BT device status changes. 2) repopulate the connection
list in the download screen when a BT status change is detected.
Notice the subtile change of the Q_INVOKABLE btEnabled() function
to a Q_PROPERTY. This gives a nice dynamic behaviour when
switching BT on/off with the app open.
Fixes: #556
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Simple rewrite of a piece of code separated to its own function
so that is can be used in other places as well. To avoid code
duplication for dynamic BT on/off switching on mobile.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Preparation primarily for mobile. When we want to switch in
one session from BT to cable connection and vise versa, we
need a way to clear the model data containing the possible
connections in use.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Tweak some of the explanations, expand a few sections a bit more, overall try
to make the user manual even more comprehensive.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Following master is just not healthy. We need to be more deliberate
in which version we built against. An update in the last 24 hours
broke Subsurface-mobile again.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>