Commit graph

9397 commits

Author SHA1 Message Date
Dirk Hohndel
c332bf2cfa Don't start Add or Plan while accessing cloud storage
This avoids a race condition where we get confused about our internal
state.

Fixes #1031

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-22 17:20:17 -07:00
Robert C. Helling
e167506bdb Make the reserve gas units aware
In the planner, for recreational mode, there is a setting indicating
the pressure at which the diver should be back at the surface. This
pressure was hardcoded to bar.

Fixes #1027

[Dirk Hohndel: small modifications, more reasonable step for psi,
               more reasonable maxima]

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-22 16:32:39 -07:00
Miika Turkia
0d080f3249 CSV export
Need to discard dive site notes on csv export..

miika

From ab23245e2acee32410fa680d0eaab098af69b5c2 Mon Sep 17 00:00:00 2001
From: Miika Turkia <miika.turkia@gmail.com>
Date: Mon, 21 Mar 2016 17:50:28 +0800
Subject: [PATCH] CSV export: discard dive site notes

The new format of divesite management breaks the CSV export as the notes
of divesites are matched.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-22 08:43:46 -07:00
Rick Walsh
550f07da8b Profile widget: Display gradient factors used in plan
Currently, the gradient factors displayed at the top of the profile are the
gradient factors set in preferences.  This is correct for saved dives, but
when planning dives, the gradient factors displayed at the top of the profile
should be the gradient factors used in the plan.

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-19 11:35:28 -07:00
Dirk Hohndel
3f4d0e317d Fix cmake for libssh2 1.7 and later
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-19 11:17:16 -07:00
Rick Walsh
ea281b66a8 Calculate VPM-B ceiling outside of planner
Doing VPM-B calculations for dives outside of the planner has not been
possible because real dive data does not record either:
	- reference pressure for the Boyle's law compensation (i.e.
first_stop_pressure), or
	- deco_time for the vpmb_next_gradient function used to do the CVA
calculations

However, we can infer these values to be:
	- first_stop_pressure is the deepest ceiling in the dive
	- deco_time is dive time from the deepest ceiling until the
	  ceiling clears (or would have cleared if the diver finished
	  their deco obligations)

With these assumptions, the CVA converges rapidly.

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2016-03-18 09:54:44 -07:00
Rick Walsh
e15f13d861 Profile: Display VPM-B rather than GF when in VPM-B mode
If we are planning a dive using VPM-B with +x conservatism, we want to
print "VPM-B +x" at the top of the profile, instead of "GF xx/yy".

Accordingly, the variable gradientFactor in profilewidget2.cpp is renamed
decoModelParameters to reflect what it represents.

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2016-03-18 09:54:30 -07:00
Anton Lundin
ab1dc3ce38 configure OSTC/OSTC3: Bugfix depth parameter unit
The unit for the depth parameters ain't meters, its 0.1 meters. This
caused the values stored to be out of range.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-18 09:52:43 -07:00
Jeroen Massar
122088c891 Verify that the Xcode Command Line Tools are installed
Otherwise /usr/include does not exist on a clean-ish install

Signed-off-by: Jeroen Massar <jeroen@massar.ch>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-16 07:34:57 -07:00
Jeroen Massar
1bea93d6ee build.sh: detect user's Qt5.5 + Qt5.6
As in master: detect Qt path and Homebrew qt5 + preserve that path in
CMAKE_PREFIX_PATH and pass it along to cmake

Signed-off-by: Jeroen Massar <jeroen@massar.ch>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-16 07:33:58 -07:00
Jeroen Massar
777ee8a5cd Debug reminder: how to get more verbose details out of cmake
Signed-off-by: Jeroen Massar <jeroen@massar.ch>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-16 07:33:17 -07:00
Miika Turkia
e90b409a14 UDDF export: fix dive site support
We need to match the divesites to suppress extra output that breaks the
XML. This is because the divesites are actually gathered by calling a
template.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-16 07:31:46 -07:00
Robert C. Helling
2639281354 Copy picture struct for worker thread
This copies the picture struct when delegating image handling
to a worker thread to prevent a crashe when main thread
frees the picture upon selecting a different dive.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-15 22:38:47 -07:00
Robert C. Helling
2368f3371b Store Thumbnails with image hashes
This drastically improves the time it takes to select a dive
with several pictures at the expense of longer startup and
bigger hash files.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-15 22:38:35 -07:00
Robert C. Helling
126ce41b5c Don't build libdivecomputer examples
... as those don't compile.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-15 13:36:26 -07:00
Dirk Hohndel
2163ae026f Update ReleaseNotes
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-28 06:38:58 +01:00
Robert C. Helling
b1c923cd59 If salinity is not density, add density of fresh water
There was a reported case of an import of a dive that gave a salinity of
35g/l. This is an actual salinity (an amount of salt in the water) but
for subsurface the salinity is actually the density of the water. So for
too small values of the salinity add the density of fresh water.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-27 22:31:43 +01:00
Dirk Hohndel
563ff6bdc4 Prepare README and ReleaseNotes for 4.5.4
Just so I don't forget. Still some more testing needed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-27 00:02:25 +01:00
Miika Turkia
55fbddb756 Initialize the random number generator
We use random numbers for file names, both temporary filename when
creating a zip for divelogs.de upload and for filename on form data for
facebook upload. This does not require for true randomness but we still
want these to not be constant on each run of Subsurface. Thus we need to
initialize the random number generator.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:31:16 +01:00
Miika Turkia
d5f2bb2353 Use full precision on weight system on XSLT transforms
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:31:08 +01:00
Miika Turkia
d38f50d128 Divelogs.de import: encode + character on password
Upload seems to work as is...

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:30:48 +01:00
Miika Turkia
875a9035fb Allow merging of dives with zero depth/duration
Fixes #1003

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:25:08 +01:00
Miika Turkia
7e1ba8e925 Fix Liquivision import crash
When we detect a redundant DC we free the memory reserved for the model.
Thus we need to malloc that memory here.

Fixes #1002

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:24:56 +01:00
Jan Mulder
e15ec99dfe Update copyright for 2016
Trival string update.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:24:38 +01:00
Miika Turkia
a5dde4c34a Mark CCR dive's divetype properly
We used to mark CCR dives by having "SP change" event at time 0:00.
As we nowadays mark CCR dives by setting dc->divemode appropriately,
better to convert the old dives to this format as well. This way we do
not have to take the special old format into account on multiple places
in the source.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:23:43 +01:00
Miika Turkia
43ec76283b Attempt to detect time format on CSV import
This attempts to detect the time format when initially importing a CSV
file. Well, only the minutes:seconds notation is detected currently.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:23:19 +01:00
Miika Turkia
3c83b2218b Attempt to detect date format on CSV import
This tries to detect the date format when initially reading a CSV file
for importing.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:23:10 +01:00
Miika Turkia
9bd9850688 Show only as many stats as there are DC types
After reserving only the required amount of data for stats_by_type, we
showed an extra DC type on the statistics (no more extra space filled
with 0 at the end of the buffer)

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:21:51 +01:00
Miika Turkia
e8afb7120c Support PSI on CSV import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:21:25 +01:00
Anton Lundin
7ae578ae6a configure OSTC/OSTC3: Add safety stop parameters
This adds the configure parameters for safety stops on the hwOS(OSTC3)
and OSTC computers.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:21:07 +01:00
Anton Lundin
c13da59ecc configure OSTC3: Add temperature sensor offset
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:20:59 +01:00
Anton Lundin
19caca1d36 Use libdivecomputer libc wrappers instead of Qt
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:20:51 +01:00
Anton Lundin
57bb04a529 Remove unused headers
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:20:39 +01:00
Anton Lundin
cf095489aa Remove workaround for OSTC Sport 10.22 and below
Now with firmware 10.23, the settings behave as they should, and won't
hang the communication.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:20:31 +01:00
krisalpha
2a4ce01322 Fix UI issue with location management
The index in the fixpopup function was incorrect which caused the user to
need TWO cursor down presses to move to the second element. I changed the
index value so the user now needs only one key press to traverse up/dowm.

Fixes #954

Signed-off-by: krishan Chopra <choprakrishan61@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:18:49 +01:00
Dirk Hohndel
a01e4fefb4 Don't blindly copy a pointer to the heap
Copying the entry pointer and assuming that it stays valid is of course totally
bogus. This is most likely the reason for the random crashes people have
observed.

See #992

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:18:25 +01:00
Dirk Hohndel
b2eee9db6b Fix crash with empty (or very short) dive list
In commit 37c10c8fd6 ("Add dive type to statistics window") not enough
space is reserved for the newly introduced array if the dive list as fewer
than 4 entries.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:17:33 +01:00
Miika Turkia
403d6dcfb0 Add dive type to statistics window
This adds dive type based division to the "yearly statistics" window.
Thus people can see the stats from individually from OC, CCR, PSCR and
freedive.

See #949

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:16:55 +01:00
Miika Turkia
b73f56bc43 Hide the time from trip tab
This hides the start time when viewing trip details.

See #964

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:16:24 +01:00
Miika Turkia
09cec219f7 Mark date field readonly on trip edit
The date comes from the first dive in trip, thus no need to allow
editing (especially since the edited date seems to be discarded in any
case).

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:16:11 +01:00
Miika Turkia
cd44aabb5f Support for imperial depth on worldmap export
This will use the depth units from user preferences when exporting the
worldmap.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:15:43 +01:00
Miika Turkia
5229c507cb Add automake to the list of Debian dependencies
automake is recommended by autoconf, but depending on the
configuration, the recommended packages might not be installed. Thus
it is better to have it explicitly listed.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:15:23 +01:00
Miika Turkia
4052fea817 Improve group information on USB device
As the group can be something else than dialout on some systems, mention
this on user manual.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:15:02 +01:00
Miika Turkia
f3c8ae2bf8 Fix UDCF import time unit in timedepthmode
The timedepthmode specifies the time in seconds when using si units,
otherwise minutes. This patch implements this support.

Fixes #981

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:14:46 +01:00
Dirk Hohndel
95020f5989 Pull latest translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-26 09:13:56 +01:00
Dirk Hohndel
ca3b1bb6ef Add Catalan translation
And enable it for builds.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-29 12:11:55 -08:00
Dirk Hohndel
efc7117c21 Latest translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-13 11:40:16 -08:00
Dirk Hohndel
9fe1e0fb34 New strings for translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-07 10:41:06 -08:00
Dirk Hohndel
06e704d98a Documentation updates for 4.5.3
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-07 09:45:32 -08:00
Dirk Hohndel
f9d5fe56b3 Revert "NSIS: add a couple of uninstaller checkboxes"
This reverts commit d69c9e08af.

While this is a nice improvement, it requires other patches to work
correctly which go beyond what I'm comfortable having in a "quick update
to 4.5".
2015-12-07 09:32:17 -08:00