Commit graph

9416 commits

Author SHA1 Message Date
Miika Turkia
3ce15d236b Add pipe as supported field separator on CSV import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-25 12:02:15 -07:00
Dirk Hohndel
40af185902 Latest translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-19 15:46:24 -07:00
Dirk Hohndel
e56e522ac5 Update ReleaseNotes
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-18 21:00:47 -07:00
Miika Turkia
410ea40229 Import picture URLs from divelogs.de
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-18 20:59:25 -07:00
Miika Turkia
a1fb31a2d8 Fix UDDF import indentation
Only indentation is changed on this commit.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-18 20:59:08 -07:00
Dirk Hohndel
a26c1c6df1 Updates for version 4.5.6
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-18 20:14:40 -07:00
Rick Walsh
ed8e665242 VPM-B profile: declare CVA iteration variables within each loop
The variables that control each CVA iteration should be declared at the start
of each loop so that the values are carried over from one iteration to the
next.

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2016-04-18 20:10:10 -07:00
Robert C. Helling
15d07a879e Fix time of first ceiling calculation
In our verision of VPM-B for real dives, we take as the deco time the
difference between the time of the deepest ceiling and the time when the
ceiling clears.

When the display of ceilings was set to multiples of 3m this was confused, as
the maximum finder had issues: First of all, it updated the time when the ceiling
was the same (which was almost always the case for stepped ceilings) but changing
>= to > was not enough, since then the first time a deepest stepped ceiling was
reached was used.

This patch uses the actual ceiling (not rounded to the next integer multiple of 3m)
for this calculation to get rid of this problem.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2016-04-18 20:09:58 -07:00
Linus Torvalds
b3b43e0140 Fix dive computer copying
When copying a dive, we need to copy all the dive computers, but the first
one is special since it is embedded inside the "struct dive".

We had special case code for that case, but it only copied the samples and
events.

Use the proper "copy_dc()" for the primary dive computer copying too,
which gets all the details right.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-11 12:23:49 -07:00
Linus Torvalds
7e15c2a7ad Fix seabear import sample overrun bug
The Seabear import fixed up the NDL and TTS in the samples from minutes
(in the import) to seconds (our internal format for all time).  But it
did it with a loop that overran the end of the samples array by one:

	for(int s_nr = 0 ; s_nr <= dive->dc.samples ; s_nr++) {

Fix it to use the proper "<" instead of "<=".

Reported-by: Stuart Vernon <stuartv@force2.net>
Tested-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-11 12:23:39 -07:00
Dirk Hohndel
37e08d5e25 Give git progress dialog a chance to actually display something
The UI only runs when the main thread pauses, but the main thread is busy
doing the git update.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-09 08:33:37 -07:00
Dirk Hohndel
d0754138a4 Update ReleaseNotes
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-09 08:33:37 -07:00
Dirk Hohndel
669e2bf9fe Cloud storage: make first connect a post
But don't wait for it to succeed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-09 08:33:36 -07:00
Dirk Hohndel
fe8c2ba6ce Update ReleaseNotes
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-02 06:32:18 -05:00
Miika Turkia
e9caf75db0 SDM import: fix logic for sample import
Seems that testing if BOOKMARK is empty is a bad idea. We end up not
getting any samples, but the ones containing a bookmark. So we need to
switch the logic to testing if BOOKMARK contains something and do those
tasks first and otherwise grab a regular sample.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-02 06:31:31 -05:00
Miika Turkia
916ed01830 SDM import: calculate duration if needed
Seems that DiveManager does not always return the dive duration in
DIVETIMESEC field. In this case we can try to calculate the duration
from sample count and interval.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-02 06:31:22 -05:00
Dirk Hohndel
3ba21027b9 Get ready for 4,5,5 release
Update README and ReleaseNotes

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-28 16:40:15 -05:00
Robert C. Helling
90bd1b0af7 When changing units from psi to bar first change value, then max
otherwise the max interferes with the value. Furthermore this increases
the max values a bit.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 13:55:09 -07:00
Werner Macho
fd10342b24 typo fix
small typo fix for GUI

Signed-off-by: Werner Macho <werner.macho@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 13:38:05 -07:00
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