Commit graph

9867 commits

Author SHA1 Message Date
Dirk Hohndel
5b08705f39 Pull latest translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-27 15:23:39 +09:00
Dirk Hohndel
3b419b3d07 Make libtool versioning happy
This way we find the versioned libdivecomputer.dll

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-26 15:19:05 -07:00
Dirk Hohndel
5d8f3c1ebd Cmake: fix incorrect modification of a QT_LIBRARIES
It's a list, not a string. Treating it as a string creates all kinds of
exciting weird errors that make no sense.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-26 14:51:07 -07:00
Dirk Hohndel
47c7958ed3 Build Windows installer with shared libdivecomputer
Since we ship it all in one piece there is no reason to use a static
libdivecomputer (like there is on Linux). This allows us to give the user
a different libdivecomputer.dll for testing when tracking down a bug.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-26 14:27:16 -07:00
Dirk Hohndel
c6ec742d11 Build libzip with cmake when cross building for Windows
This seems to fix our issues with being able to create zip files on the
fly (needed for the divelogs.de access).

Fixes #955

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-26 14:24:34 -07:00
Dirk Hohndel
755ecf607a Remove unnecessary Q_INTERFACES declaration
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-27 06:15:14 +09:00
Dirk Hohndel
aa78c5b0ec Allow building with both libzip 0.11.x and 1.0.x
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-26 06:51:47 -07:00
Dirk Hohndel
3b0f38f24a Fix building without BT support
I guess no one had tried this in a while.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-26 06:51:47 -07:00
Miika Turkia
1d10a56bdf Some error reporting on divelogs.de export
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-26 01:19:40 +09:00
Dirk Hohndel
8c706357f4 Report error received from zip_close
We may want to hide the error text in a release build and replace it with
something more user friendly but then again, the next time this fails on
us at least our users can report more than "doesn't work"...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-25 23:39:29 +09:00
Dirk Hohndel
3b033a85ac Divelogs.de upload: report error when unable to open upload file
Silently failing is not cool.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-25 14:48:25 +09:00
Dirk Hohndel
622fb4f800 List latest changes in ReleaseNotes
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-25 14:01:43 +09:00
Dirk Hohndel
3c8a9bc057 Move informational output to only be shown in verbose mode
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-25 13:57:11 +09:00
Linus Torvalds
2b1017c986 Interpolate depth for samples that have no depth
When downloading from libdivecomputer, we used to initialize the depth
of a sample to the previous depth.  However, at least for the Suunto EON
Steel, you can get sample times without any actual depth reading - the
time might be associated with some ranbdom event rather than a new depth
sample.

Rather than initialize these samples to have the same depth as the
previous one (and then perhaps getting a very sudden jump when the
*real* depth event comes in a second later), initialize the depth
samples to -1, and if that sample doesn't get a real depth, we'll create
an interpolated depth.

It is possible that we should just carry the sample around as not
actually having a depth, and instead just interpolate in the plot_info
generation, but at least right now we have a ton of code that "knows"
that every sample has a depth.  Not the least of which is our own save
format.

So generating an interpolated depth seems the path of least resistance,
and at least makes the graph look correct - no odd staircase effect from
other events that happen in between depth samples.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-25 13:22:59 +09:00
Dirk Hohndel
cd1884b29c Use neutral color for "no SAC information"
In commit 31d1d1f421 ("Don't change pen color when for zero SAC") Robert
continues to use the last SAC color (which certainly was better than
switching to dark green for "extremely low SAC rate"). But I think it
makes even more sense to mark it as neutral - so I picked a gray.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-25 13:00:58 +09:00
Dirk Hohndel
1ff309c9a1 Fix location edit UI issue on Mac
For some reason the Mac doesn't create an "activated" signal when hitting
enter/return on the drop down. So we simply manually send this and now you can
select the site with enter/return just like on Linux or Windows.

Fixes #953

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-25 12:19:18 +09:00
Miika Turkia
bf2df951e6 Divelogs.de export: split location on slash
As we join LOCATION with SITE on divelogs.de import using slash (/) as a
separator, we might as well split on last slash on export.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-24 20:17:21 +09:00
Dirk Hohndel
997123c0a4 Merge branch 'for_dirk' of https://github.com/atdotde/subsurface 2015-10-24 06:55:51 +09:00
Robert C. Helling
31d1d1f421 Don't change pen color when for zero SAC
When for individual plot entries the SAC is zero this comes
from gas changes and the SAC calculation needing a bit more
pressure data and not from the diver switching to freediving
mode. So we shold not change the pen color on the pressure
line for that but pretend we are still breathing at the
previous SAC.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2015-10-23 23:50:21 +02:00
Linus Torvalds
ae1e9b11a5 Fix the momentary SAC calculation for the profile coloring
There was tons wrong with the code.  You can't just average the SAC rate
over different plot entries, since they may not be the same duration.
And it got the beginning and end conditions wrong etc etc.

This should at least get much closer.  And it's structured to be a lot
more understandable, I hope, even if the math is a bit more involved (ie
doing the proper time-pressure integration etc).  It may still have
bugs, but at least it now gets the right coloration at the beginning of
a dive, and just eye-balling the slope vs color it seems to do the right
thing.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2015-10-23 23:50:08 +02:00
Dirk Hohndel
6703e1091b Latest strings for translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-23 22:50:28 +09:00
Jan Mulder
604971ca0c Add missing tr() implementations
One specific string did not translate. First, Dirk and I (via IRC)
suspected a leading space was the issue (see commit eccac1321f).
However, I found out that the problem was still there. A non translated
string "%1 shown", when applying a filter on the divelist, and looking at
a trip line. It shows always untranslated "%1 shown". Extracting
to-be-translated strings from the code, I found 2 errors: Class
<classname> lacks Q_OBJECT macro.

This patch adds a missing tr() definition and implementation to 2 structs.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-23 22:48:41 +09:00
Jan Mulder
f682ea0085 Fix broken translation in divelist
Fixes a broken translation in the divelist introduced in commit 45b1d0d73d.
Now, the (.. dives) string on a trip line in de divelist is translated (again).

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-23 22:47:52 +09:00
Dirk Hohndel
04179eb237 Update ReleaseNotes to track latest changes / fixes
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-23 22:27:08 +09:00
Robert C. Helling
2a977a0fcd Set a cylinder if the default cylinder is bogus
Apparently, it can happen that the default cylinder is not set
even though same_string(prefs.default_cylinder, "") is false.
Then we fall back to the 11.1l air cylinder.

This should silence a warnign about "Too many gases".

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-23 05:57:46 +09:00
Dirk Hohndel
6495b629fe Interpretive dance to parse Suunto EON Steel tank sizes
Admittedly, imperial tank sizes are a bit weird.

But it must have taken some effort to break things as creatievly as Suunto did.
The UI allows only multiples of 100psi and multiples of 10cuft. Which shows
that the developers have no idea what typical imperial tanks look like. AL72?
AL63? HP tanks at 3440psi? LP+ at 2640psi?

Yeah, I get it - you had no idea, someone showed you an AL80 and you made silly
assumptions.

But even then, what the heck are you storing in your data, dear Suunto? The
pressures are off by the very logical factor of 1.00069182389937. And then
regardless whether I use the wrong pressure or the corrected pressure, the wet
sizes are too small by a non-constant factor.

So this code takes the junk that libdivecomputer truthfully passes through from
the Suunto parser and tries to convert it into something that matches what the
user most likely entered in the EON Steel UI. Ugly. Stupid. But it seems to
work.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-22 20:35:02 +09:00
Guido Lerch
f1c682b55a Fixing annoying compiler warning
Adding { } to if clause to avoid dangling warning
/Users/guidolerch/src/subsurface/qt-models/cylindermodel.cpp:117:
warning: add explicit braces to avoid dangling else [-Wdangling-else]

[Dirk Hohndel: combined two of Guido's patches to one that is simpler]

Signed-off-by: Guido Lerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-22 19:37:50 +09:00
Guido Lerch
ac8e05c4ec Fixing build warning about freediving
This just fixes an annoying warning that freediving wasn't covered in the
switch statement.

Signed-off-by: Guido Lerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-22 07:14:51 +09:00
Guido Lerch
07b4878c52 Uemis fix for Ubuntu
Fixing a bug preventing to download files on Ubuntu.
On Ubuntu some files are recognized as DIR and not as regular files.
This is a fix that works but most lilely does not address
the root cause which would need an expert to look at..

Signed-off-by: Guido Lerch <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-22 07:10:26 +09:00
Dirk Hohndel
569cfe1bc8 When calculating the offset, both times are localtime
So we don't need to take the relative time zone into account.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-22 07:04:32 +09:00
Dirk Hohndel
c0fb98711b Don't clear out the time stamp we remembered
Otherwise the offset calculation ends up completely wrong.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-22 07:04:32 +09:00
Dirk Hohndel
e121223fec Latest translation updates
Includes the remainder of Hebrew done by Benjamin

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-22 06:59:45 +09:00
Steve
4722df805d Update install file to build on Fedora 23
Updated packages required to build on Fedora

[Dirk Hohndel: dropped part already fixed earler]

Signed-off-by: Steve Williams <stevewilliams@internode.on.net>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-20 17:32:33 +09:00
Robert C. Helling
27f706064f Always make sure the planner starts with at least one cylinder
void DivePlannerPointsModel::setupCylinders() in diveplannermodel.cpp
handles setting up cylinders for the planner. If there is a current
dive, cylinders form that dive are copied. Otherwise the default
cylinder is added and lacking that a standard size cylinder.

If the current dive does not have any cylinders, we could end up
without cylinders. This patch adds a test for this case and delegates
to the other two sources of a cylinder in that case.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-20 17:11:04 +09:00
Robert C. Helling
d0d8c12c8c Mention hidapi in Mac building instructions
Add it to the list of homebrew packages.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-20 17:10:33 +09:00
Joakim Bygdell
0c9d71234f Show correct icon when only one gasmix in the list
When there is only one gasmix in the list we should show the icon that tells the
user that they can't remove the last gasmix from the list.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-19 11:45:12 -07:00
Willem Ferguson
dffd2857f6 User manual updates
1) Delete duplicate or unused images in Documentation/images directory
2) Add text to describe user manual viewer functionality
3) Add image to explain 2) above
4) Add text to explanation of TTS toolbar button (Thank you very much, Davide!)
5) Update image showing display of TTS toolbar button

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-19 09:46:02 -07:00
K. \"pestophagous\" Heller
5902a1aace Add perl function indent_ctor_init_lists to whitespace.pl
whitespace.pl can now do a better job (although surely
still not 100% perfect job) of formatting constructor
member initialization lists according to the rules
described in the current CodingStyle file.

Signed-off-by: K. Heller <pestophagous@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-19 07:37:35 -07:00
K. \"pestophagous\" Heller
efaf697e76 Reenable ForEachMacros in .clang-format
The use of ForEachMacros is working as expected when
used with clang-format version 3.5.0-10.

Also add ConstructorInitializerIndentWidth: 8, which
slightly helps with ctor style, but still does not
enforce the full subsurface ctor guidelines.

Signed-off-by: K. Heller <pestophagous@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-19 07:37:05 -07:00
K. \"pestophagous\" Heller
9710b2a540 Sort the entries in .clang-format alphabetically.
No changes were made to the values of the entries.
Sorting makes it easier for a clang-format n00b to
compare each setting to its documentation on the
http://clang.llvm.org/docs/ClangFormatStyleOptions.html
web page.

Signed-off-by: K. Heller <pestophagous@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-19 07:36:43 -07:00
Dirk Hohndel
df7f8b700b Grab latest translations
This includes my attempts to address the issues raised by the translation
checker script.

It also fixes the crash with the planner on Windows which was caused by
a faulty translation that replaced a '%' with a '$' in the format string.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-18 17:41:26 -07:00
Robert C. Helling
16a36a117d A perl script to check format strings in translations
This script can be called on translations files, e.g.

> scripts/checktranslation.pl translations/*ts

and will report if the number of % signs in source and translation
differ.

It finds quite a few issues that need to be investigated.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-18 17:37:49 -07:00
Dirk Hohndel
9e10900e72 Document the changes since 4.5
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-18 17:37:49 -07:00
Giorgio Marzano
ba3b048292 Change plot scaling to handle FREEDIVE mode Add FREEDIVING value to plot_info::plot_type
Signed-off-by: Giorgio Marzano <marzano.giorgio@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-18 17:37:49 -07:00
Giorgio Marzano
44bdcffcd4 Display divetime according to dive mode and translation
Many time stats in maintab display also seconds in short freediving

Signed-off-by: Giorgio Marzano <marzano.giorgio@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-18 17:37:49 -07:00
Giorgio Marzano
166d587197 Enable/Disable toolbar element in freedive mode
Signed-off-by: Giorgio Marzano <marzano.giorgio@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-18 17:37:49 -07:00
Giorgio Marzano
45b1d0d73d Display day number in trips longer than 1 day
Signed-off-by: Giorgio Marzano <marzano.giorgio@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-18 17:37:49 -07:00
Ash Kamel
5d1703cf2c Adds path to executable
This commit adds a path to the executable file based on the `build.sh` installation instructions.

Signed-off-by: Ash Kamel <ajkamel@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-18 17:37:49 -07:00
Robert C. Helling
0f63b524a6 Mention Shearwater Nerd
alongside Petrell 2 since this seems to be the same computer internally.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-18 17:37:49 -07:00
Gaetan Bisson
9c49f8924b increase cloud connection timeout
Awesome diving location does not rhyme with small Internet latency.

Signed-off-by: Gaetan Bisson <bisson@archlinux.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-10-18 17:37:49 -07:00