Commit graph

12736 commits

Author SHA1 Message Date
Willem Ferguson
cd555f9dac Update to latest user manual
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-20 14:13:26 -04:00
Miika Turkia
4fe8eb6f65 Do not overwrite start and end pressures on cylinder
The pressure information of cylinder should be kept intact when
copy-pasting other cylinder related information from other dive.

According to Dirk, the gas mix is wanted to be changed as technical
divers might have always the same multiple cylinders and wish to copy
the gasmix information over.

Fixes #689

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-10-20 15:16:11 +02:00
Stefan Fuchs
748bb90a73 Update dive planner points cylinder names also when cyl is added
Amendment to c29456f0bb

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-10-20 07:55:18 -04:00
Stefan Fuchs
93e2bda070 Do cylinder renumber for dive data points only when in planner mode
Amendment to 73d2ab8099

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-10-20 07:55:18 -04:00
Dirk Hohndel
59bf217157 Turn off Facebook debug messages unless verbose
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-20 06:51:51 -04:00
Dirk Hohndel
bebee64ca9 Don't show localization warning unless verbose
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-20 06:51:51 -04:00
Stefan Fuchs
022b3e450b Translate dc text in profile also if string has suffix for > 1 DC
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-10-20 06:38:20 -04:00
Lubomir I. Ivanov
e4a9787c5e dive.h: add handling of NULL in get_dive_dc()
This line:
    dc = &dive->dc
can SIGSEGV for a NULL 'dive' pointer.
return NULL if 'dive' is NULL.

Also handle NULL 'dc' in get_gasmix() and set 'ev' to NULL.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-10-19 22:03:51 -04:00
Stefan Fuchs
c3274b0b9f When selecting icons for events don't misinterpret a gaschange
Don't misinterpret a gaschange as "useless internal of the dive computer"
when it has a higher flag value.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-10-19 19:00:55 -04:00
Robert C. Helling
a422957cd6 Use displayed_dc instead of current_dc
current_dc is a macro that determines the dive computer
based on the current dive number. When the planner is started
from an emtpy dive list, the dive number ends up being -1 and
that doesn't produce a valid dive computer. Use the divecomputer
of the displayed_dive instead. This is done via a macro that
can also be used in two other places. Without this patch, the
planner crashed when called on an empty dive list.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-10-19 14:57:02 -04:00
Jan Mulder
a9b692f0c3 QML-UI: Download screen fixup
Again, mostly related to label change. First, the top button was "glued"
to the top of the screen, so added a little margin there. It
appeared that all the other items on the screen (progressbar,
2 button rows, and the downloaded dive list) where not moving down
due to the add of that little top margin. This was solved by
anchor-ing the items together. Finally, the text of a downloaded
dive was on the top of the delegate lines. Not sure where that came
from, but easily solved by centering it explicitly.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-19 14:55:30 -04:00
Jan Mulder
53ed1c7326 QML-UI: some more layout repair (dive details)
As in a525fff112, also the dive details top data was not nicely positioned
any more due to the deprecated and removed Kirigami.Label.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-19 14:55:30 -04:00
Dirk Hohndel
49771d8748 Update translation source strings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-19 07:38:32 -04:00
Robert C. Helling
e955099e6c Refuse to save an empty log to the clould
This should prevent the problem of a user accidentally
"deleting" their dives in the cloud by hitting "save to cloud"
in the wrong moment.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-10-19 07:37:47 -04:00
Lubomir I. Ivanov
e9673938fb printoptions.cpp: correctly remember the last selected template
To find the last selected template index in the combo box,
comparing against `printOptions->p_template` would work fine,
except the `on_printTemplate_currentIndexChanged()` slot updates
`printOptions->p_template` each time QComboBox::addItem() is
called. This makes the `for` loop to add new combo box items
and find the index of the last selected template not possible.

To work around the issue, a local QString variable `storedTemplate`
is introduced and it does not change during the `for` loop.

Fixes #595

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-10-19 14:04:38 +03:00
Willem Ferguson
305a35a48c Desktop user manual update for V4.7
The text of the user manual is updated in the following sections:
1) Bluetooth downloads
2) Using the new Dive Map tool of Lubomir
3) SmartTrak import using Robert's web service
4) Several details about the planner, including plan variations and minimum gas

11 images  were replaced or added.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-19 06:40:50 -04:00
Stefan Fuchs
27a8fd51ed Planner: Autom. move first datapoint gas to first gaslist position p2
This is a amendment to 24bd5a8dce

Move the cylinder also to first position if first planner datapoint
cylinder change because a row is added or deleted to the dive datapoints.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-10-18 23:20:44 +02:00
Stefan Fuchs
7a82103c99 CNS calculation fix
Identify previous dives for CNS calculation in a similar way as it
is done for previous dives for deco calculation.
This is done to identify the previous dives dynamically when moving
around date/time of a dive in the planner.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-10-18 23:19:13 +02:00
Stefan Fuchs
4158a4c7de init_deco correctly identify previous dives and report overlapping dives
When changing the date/time of a dive in the planner the dive may end
up in a totaly new position in respect to date/time of other dives in
dive list table. It can be moved to the past or the future before or after
other existing dives. It also could overlap with an existing dive.

This change enables identification of a new "virtual" dive list position
and based on this starts looking for previous dives.
Then it (as before the change) does init the deco calculation with any
applicable previous dive and surface interval.
If some of these applicable dives overlap it returns a neg. surface time
which is then used in the planner notes to prohibit display of results.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-10-18 23:19:13 +02:00
Salvador Cuñat
59845c1343 mobile-manual_es.txt: updates up to 8b01758e
Update spanish translation of mobile-manual to git 8b01758e of the
english version.
2017-10-18 19:16:43 +03:00
Stefan Fuchs
ba7be8f335 plannernotes.c coding style fixes
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-10-18 17:41:42 +02:00
Stefan Fuchs
94e563a94e Minimum gas calculation: Change text colors for delta value output...
and adapt the strings for translation to s.th. which can be handled more
easily.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-10-18 17:41:42 +02:00
Dirk Hohndel
3eaff35ae6 Update SupportedDivecomputers
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-18 07:54:44 -04:00
Dirk Hohndel
849d915400 Release Notes tweaks
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-18 07:54:44 -04:00
Stefan Fuchs
fcc4be6ea0 Add a icon for gaschange to Oxy with all green tank shoulder color
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-10-18 06:47:44 -04:00
Robert C. Helling
432110ac8f Find current gasmix for heatmap
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>
2017-10-18 06:34:15 -04:00
Jan Mulder
a525fff112 QML-UI: repair DiveList
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>
2017-10-18 06:30:51 -04:00
Dirk Hohndel
64d342ca9f Latest translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-17 15:36:35 -04:00
Jan Mulder
d623eccdef mobile: silence deprecated messages in logging about Kirigami.Label
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>
2017-10-17 15:32:27 +02:00
Jan Mulder
f7da06c76b mobile: fix initial setup with no repo or meta info
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>
2017-10-17 14:29:17 +02:00
Jan Mulder
16b395a898 mobile: No cloud repo creation more explicit
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>
2017-10-17 14:29:17 +02:00
Stefan Fuchs
90fcfca02c Taxonomy: Don't access empty entries when printing the tags
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-10-17 06:12:07 -04:00
Stefan Fuchs
884e690049 Tags for geo references: Nicer look, translations and warning message
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>
2017-10-17 06:12:07 -04:00
Stefan Fuchs
ac7830ea91 Correct spelling for text in prefs georeferences
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-10-17 06:12:07 -04:00
Jan Mulder
4406a6ccf9 Fix Android compile error
Trivial typo only visible on Android build.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-17 10:42:42 +02:00
bs
1fe76b02da Connect finished signal of download thread only once
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>
2017-10-16 14:02:06 -04:00
Stefan Fuchs
180e51a906 Tidy up code in planner.c - create_dive_from_plan()
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>
2017-10-16 18:23:27 +02:00
Stefan Fuchs
f812dc5d9b Fix dump_plan debug code
This fixes some debug code to dump the diveplan which is usually
not compiled and used.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-10-16 18:23:27 +02:00
Stefan Fuchs
4fa576526f Planner creating dive from plan: No pressure for 1st sample with new gas
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>
2017-10-16 18:23:27 +02:00
Stefan Fuchs
bfe52f6689 Correctly name member function gasChange of DivePlannerPointsModel
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-10-16 17:14:17 +02:00
Stefan Fuchs
3e67bfaea6 In planner prefer best_first_ascend_cylinder for gas breaks
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>
2017-10-16 17:14:17 +02:00
Stefan Fuchs
80a2cd7b1b Don't confuse cyl with same gasmix with best_first_ascend_gas
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>
2017-10-16 17:14:17 +02:00
Stefan Fuchs
24bd5a8dce Planner: Autom. move first datapoint gas to first gaslist position
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>
2017-10-16 17:14:17 +02:00
Stefan Fuchs
73d2ab8099 Update diveplannerpoints cylinderidx when deleting a cylinder
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-10-16 17:14:17 +02:00
Stefan Fuchs
df6933326d In dive.c make cylinder_renumber an external function...
instead of dc_cylinder_renumber() because it is the one which is really
useful elsewhere.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-10-16 17:14:17 +02:00
Stefan Fuchs
c29456f0bb Used gas in dive planner points: Support for multiple cyl with same gas
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>
2017-10-16 17:14:17 +02:00
Stefan Fuchs
8fd1c72f04 Removing cylinders in planner: Be more restrictive
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>
2017-10-16 17:14:17 +02:00
Dirk Hohndel
cbf5d788e0 Update Ubuntu/Debian packaging
Part of this is based on code from Miika Turkia.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-10-16 04:54:53 -07:00
Stefan Fuchs
0b6fb49489 In location information UI set reverse geo lookup button activ...
as soon as coordinates are available .

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-10-16 03:43:02 -08:00
Stefan Fuchs
5b415ad8db Reverse geo lookup string for http://api.geonames.org corrected
Language selection should now work again with string "lang=xx".

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-10-16 03:43:02 -08:00