In the dive picture tab show pictures of all selected dive.
But at the same moment take care that in the profile only
pictures from displayed_dive are displayed.
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
See 2182167b53. Keep the dupicated code in sync.
Originally-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
See commit 6f42ab46da. Unfortunately, this code is duplicated
(and an obvious candidate for code cleanup). So replicate the mentioned
commit here. In fact, the mentioned issue #666 talkes about the mobile
app, and the fix was only done for the desktop.
Originally-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This fixes an annoying bug. When entering an existing divesite
in the mobile app, always a new divesite (with same name) was
created, resulting in multiple sites on the same gps location.
So, be more carefull in checking and creating a new site.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
In libdivecomputer, a new divemode is added (DC_DIVEMODE_SCR) useful
for dive computers that have specfic functionality for semi-closed
rebreathers. At this moment, only the HW computers seem to provide
this.
This commit takes care of proper recognition of this new divemode
when importing data from a dive computer.
Tested on an actual import from an OSTC3 that contained
dives in this new mode.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This is just code cleanup. Jef renamed the CCR divemode constant
in libdivecomputer, but added a define to be backward compatible as
as well (so this rename did not break our Subsurface build).
Obviously, this breaks the build for people that build against an older
libdivecomputer, but I see no reason to do that.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
This gets us the first merge with the upstream iostream implementation.
This requires a small change for serial_ftdi.c to build.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The MainWindow::setTitle() function was passed an enum, which depended
on whether existing_file is set or not. The check can be (and was!) done
directly in setTitle(). Therefore, remove the whole enum.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Before, we did not look at the path of the filename to export
to but we should write the images there and not in pwd.
Fixes#931
Signed-off-by: Robert C. Helling <helling@atdotde.de>
copy_string() does the same as the current code, but in one instead
of four lines. Strictly speaking, it does not exactly the same thing
because the empty string ("") case is handled differently. copy_string()
returns NULL instead of a copy of "", which is probably preferred anyway.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Current values (1000m, 10 min) may be too long to choose an accurate fix
while automatically applying gpsfixes to dives. They are fine if we are
diving from a static position, but will give wrong positions e.g. while
drift diving.
Reducing the default values to shorter 100m, 5min won't hurt most dives
from shore or static boats, but will make other diving styles get more
accurate gpsfixes.
signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Title is self explanatory.
[Dirk Hohndel: small edits to remove typo / improve readability]
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
ATM we were giving preference to a gps fix taken during dive time over
another taken before dive start time (proven both in predefined
SAME_GROUP 6 hours range).
While this logic is right for a static boat or a shore dive - as it
ensures a correct position - will fail for drift dives or dives where
boat changes its position during dive time.
Instead, will choose the gps fix closer to the dive start time.
fixes issue #666
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The removed comment in qt-models/divepicturemodel.h described
todo items which were already implemented.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The thumbnailing in qt-models/divepicturemodel.cpp was performed
concurrently, but the thumbnailCache was not protected from races.
Resolve this by guarding the thumbnalCache accesses with mutexes.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
The code of DivePictureModel used a QHash to keep track of thumbnails.
Not only was the code rather complex - it also had the consequence that
pictures are sorted according to the hash function, i.e. seemingly
random.
This commit replaces the QHash by a simple QList which keeps track
of thumbnails and some meta-data.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Note that constructs like QList<QFuture<void>> is incompatible with
pre-C++11 compilers. But the code base is so full of C++11isms that
we may just as well remove asymmetric eye-sores of the kind
"QList<QFuture<void> >".
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This will grab the divemode information from the first waypoint within
the dive that includes this info and uses it for dctype.
Note that our dive type is not as fine grained as the one in UDDF. The
latter allows one to switch divemode during the dive when we do not.
However, one could argue that i.e. a rebreather dive should be a
rebreather dive even if one switches to bailout gas at some point...
Fixes#922
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
While the autocomplete function only works for the first entry
adding multiple comma separated buddies can still be done.
Fixes#608
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
- Minor formatting changes
- Added a couple of missing notes
- Make the ReleaseNotes.txt format to indicate the latest
version on top
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I clearly had forgotten to update the Android specific scripts when
adding the libdivecomputer submodule.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I consider it more natural for example for the GPS menu
to stay open when an action is clicked. So this turns off
the general close but has to trigger it on individual items.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Otherwise the divecomputer has to be in pairing mode
at app start time.
Unfortunately, this leaves less space for the progress message.
My time/qml knowledge does not suffice to move that to the next line
(when moving that out of the RowLayout it overlaps with
the buttons).
Signed-off-by: Robert C. Helling <helling@atdotde.de>
It just doesn't seem to make sense. Why would you do that.
Allowing this options makes things more complicated as we need to
test for that in various places.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>