Commit graph

11231 commits

Author SHA1 Message Date
Stefan Fuchs
cd38cda186 Bugfix planner output formating (linebreaks)
Changed the markup with <div> and <br> tags of the planner output in
a way that is is a good compromise for both displaying in UI and
printing.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-02-04 07:06:29 -08:00
Dirk Hohndel
911d2798cd Android build wrapper: sometimes quotes hurt you
Shellcheck wanted quotes around "$USE_X" - but that makes the script
fail if you run it without the '-x' argument.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-04 07:02:11 -08:00
Dirk Hohndel
9a754b663a Extend Android wrapper shell to be smarter
Move it to packaging/android where it belongs
Use direct URLs to download Android components
Make sure required packages are installed (only tested on Ubuntu)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-03 17:45:26 -08:00
Dirk Hohndel
ca6a241a97 Add argument to subsurface_console_init call
Subsurface-mobile doesn't work on Windows, so we can just
hardcode this to false.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-03 17:43:25 -08:00
Robert C. Helling
855995191c Don't do strcmp on NIL pointer
This is what we have same_string() for...

This prevents a crash when saving a dive in the planner.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-03 15:04:51 -08:00
Dirk Hohndel
db7290a915 Same typo, two more times
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-03 15:01:15 -08:00
Dirk Hohndel
f563f73607 Fix build breakage with earlier Qt versions
In order to get the translations right for Windows we now explicitly
pull in a lot more translation files - some of which don't exist in
earlier Qt versions.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-03 10:58:00 -08:00
Dirk Hohndel
a959e437a9 Fix typo
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-03 09:35:01 -08:00
Lubomir I. Ivanov
4a894e0713 Win32: add the --win32log option to log stdout and stderr to files
Adding --win32log as the first command line option on Windows
will now log all stdout and stderr output to the files
subsurface_err.log and subsurface_out.log in the working directory.

This change required a new argument 'bool logfile' to be added to:
subsurface_console_init() which is defined in all platform files
(linux.c, macos.c, etc.)

Example usage:
subsurface.exe --win32log -v -v -v

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-02-03 09:24:42 -08:00
Guillaume GARDET
7c8461a328 Documentation: Merge and update french translations
Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-03 07:50:38 -08:00
Robert Helling
5aa9c6fa1b Do not count gas used in planned dives for statistics
This is important if in one dive we have the real dive and
a planned version of the dive as different computers using
different sets of cylinders.

[Dirk Hohndel: an early version of this was mistakenly pushed out
               by me; I reverted that and added this commit since
               fixing things up as I had done for the other two
               patches made things nearly unreadable]

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-03 07:45:24 -08:00
Robert Helling
67de8f3a49 Correct: Handle more tanks than gasmixes
When Suunto Vytecs are used in gauge mode they don't record gasmixes.
If a tank pressure sensor is present they nevertheless record the
pressures. This patch handles this situation by assuming the tanks
contain air (and warning the user about this).

[Dirk Hohndel: I had mistakenly pushed out an earlier version of this
               commit, so this fixes things up to the final version]

Reported-by: antonnorth@gmail.com
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-03 07:43:00 -08:00
Robert Helling
8a8315d6fe Correct "When merging planned dives keep all cylinders"
When merging a real dive with a planned dive (for comparison),
we should not try to be clever in merging similar cylinders,
rather keep the union of both cylinder sets as the two versions
of the dive might differ in exctly which gas and how much of it
was used.

Increase MAX_CYLINDERS to 20 to make room for this. We warn if we
exceed this number.

[Dirk Hohndel: I had mistakenly pushed out an earlier version of this
               commit, so this fixes things up to the final version]

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-03 07:41:35 -08:00
Dirk Hohndel
08c42813e5 Revert "In statistics, ignore gas use of planned dives"
This reverts commit 1d8662006c.

Mistakenly pushed to master

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-03 07:31:03 -08:00
Dirk Hohndel
414d7f2632 Deal with some of the whitespace issues in planner.c
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-03 03:10:57 -08:00
Stefan Fuchs
fbaeeec807 Print SAC values from prefs in diveplan
Print the SAC values from preferences into the diveplan.
These are the values used for calculation of gas consumption.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-03 02:45:58 -08:00
Stefan Fuchs
a1c51256b2 Add ATM pressure and altitude to diveplan
Print the ATM pressure and the altitude used for calculation into the resulting diveplan.
Moved this info together with the deco model info below the runtime table.
There is one drawback in this implementation: Altitude will be recalculated from surface pressure and therefore may differ slightly from altitude entered in the UI.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-03 02:45:30 -08:00
Robert C. Helling
1d8662006c In statistics, ignore gas use of planned dives
When merged with real dives, those would double count otherwise.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-02-02 12:37:24 -08:00
Robert C. Helling
a031dbbbd8 When merging planned dives keep all cylinders
When merging a real dive with a planned dive (for comparison),
we should not try to be clever in merging similar cylinders,
rather keep the union of both cylinder sets as the two versions
of the dive might differ in exctly which gas and how much of it
was used.

Increase MAX_CYLINDERS to 20 to make room for this.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-02-02 12:36:08 -08:00
Robert C. Helling
99595542ec Handle more tanks than gasmixes
When Suunto Vytecs are used in gauge mode they don't record gasmixes.
If a tank pressure sensor is present they nevertheless record the
pressures. This patch handles this situation by assuming the tanks
contain air (and warning the user about this).

Reported-by: antonnorth@gmail.com
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-02 12:35:58 -08:00
Dirk Hohndel
bc8c9f4c6f More updates to ReleaseNotes
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-01 22:21:05 -08:00
Dirk Hohndel
2b8a6cb846 Update Releasenotes
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-01 21:56:07 -08:00
Stefan Fuchs
1dc703f3df Added missing Qt5 translation files
This fixes the missing translations for some standard term like "save",
"cancel" on Windows.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-01 16:28:42 -08:00
Robert C. Helling
bb86d13546 Initialize the surface time
Otherwise we return garbage when there is no dive in the dive list.

Closes #184

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-02-01 14:43:27 -08:00
Shachar Snapiri
49cf4933df Update Hebrew translation
Signed-off-by: Shachar Snapiri <shachar@snapiri.net>

Fixed Hebrew translations - Typos and wording
2017-01-30 16:40:04 -08:00
Stefan Fuchs
3b67bc25a3 MXE windows build script mxe-based-build.sh updates
Updates mainly in the comments of the MXE build script:
- File system layout: different proposal
- Hint to not use MXE current version from git
- MXE build JOBS setting to (very) safe value of 1
- export CXXFLAGS=-std=c++11 added for marble build
2017-01-29 14:59:08 -08:00
jbygdell
0e57033042 QML UI: Parse multiple buddies when editing a dive
This allows the user to enter multiple buddies as a comma separated list,
the "Multiple Buddies" entry is still a special case as we can only populate
the combobox with a single name for each entry.

fixes #168

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-01-29 14:55:33 -08:00
Dirk Hohndel
f5a4838519 Fix dive visual editor being too quick to rescale time
When moving the last handle of a dive (in the planner, in dive add, or
when editing a dive), we rescaled the time axis whenever our idea of the
maximum duration that we should show changed. That lead to the odd
situation that you couldn't get to certain dive durations with the
visual editor (e.g. 64 minutes) because just as you approach that time
the scale changes and the dive duration jumps past the desired value.

Fixes issue #174

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-28 21:04:50 -08:00
Dirk Hohndel
279ba58236 Get started on next Releasenotes
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-28 12:40:16 -08:00
Joakim Bygdell
b0ec7146a0 Ignore double clicks on the divelist
Fixes #170 on GitHub

Simple catch function for double click events in the divelist,
prevents users from trying to edit the divenumber ithe wrong way.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-01-28 07:20:03 -08:00
Robert C. Helling
c49f044645 Reenable Ctrl-Click to delet all further dive points in planner
This is needed to make "Edit dive in planner" work reasonable.

Partly undoes f432b764

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-01-23 22:11:51 -08:00
Robert C. Helling
c1dc0c9ce0 Allow user to disable a cylinder in planner
In the cylinder table, the last column ("use") always showed
OC-GAS. Editing was enabled, but the user had to guess to enter
a small integer meaning dilluent or CCR oxygen cylingder. I guess,
nobody has ever done that.

This patch makes this column clickable. A click toggles if the cylinder
is used for planning or not. This wait it is much easier to investigate
the consequences of gas loss on a plan.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-01-23 22:11:51 -08:00
Robert C. Helling
79bba04fd4 Don't creat zero minute legs for gas switchen when replanning
Gas switches appear as special samples with zero or one second duration.
Those can be confusing when they appear as zero duration in the dive plan
when replanning, so better suppress theose.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-01-23 22:11:51 -08:00
Dirk Hohndel
4cc4f5dd7b QML UI: add translation strings for Multiple Buddies
Include German translation for testing.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-22 18:20:05 -08:00
Dirk Hohndel
b15b3c195c QML UI: allow magic phrase for multiple buddies to be localized
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-22 18:20:03 -08:00
Dirk Hohndel
0196d9a220 QML UI: correctly test if there are multiple buddies
The JS string function search returns the position of the string you
search for and -1 if that string isn't found. Also, search allows
regular expression, indexOf does just a string match. So let's use
that as it is much faster.

See issue #168

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-22 18:18:57 -08:00
Dirk Hohndel
bfaeb22cc5 QML UI: prevent modification of Multible Buddies text
"Multiple Buddies" is magic in that it means "do not change the buddies
set for this dive". Allowing the user to edit that magic phrase defeats
the purpose.

This deals with part of issue #168 - but of course that magic phrase
shouldn't be fixed as English text.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-22 18:18:07 -08:00
Dirk Hohndel
d62e46134d QML UI: allow building Subsurface-mobile on desktop
Since we manually track Kirigami we need to compile the desktopicon.cpp
file when not building on Android or iOS.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-22 16:59:23 -08:00
Dirk Hohndel
fc60f210c4 QML UI: move 'No dives in dive list' down
Otherwise it overlaps with the page title.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-21 17:06:07 -08:00
Dirk Hohndel
affea807c8 Update Subsurface-mobile version
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-21 15:59:04 -08:00
Dirk Hohndel
14b4c94ded Revert "QML UI: build against latest Kirigami"
This reverts commit a842e44b68.
2017-01-21 14:42:10 -08:00
Dirk Hohndel
6459e455bc Revert "QML UI: steps towards working with Kirigami 2"
This reverts commit 53ce3ce3e3.
2017-01-21 14:42:00 -08:00
Dirk Hohndel
31471b12c0 QML UI: don't use Kirigami 2
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-21 14:38:13 -08:00
Dirk Hohndel
273550b4e8 Android build.sh: fix libcrypto dependency in libssl
Using a binary patch seems harch, but it also seems to work.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-21 14:28:35 -08:00
Dirk Hohndel
8adcc406c7 Android build.sh: don't try to link against host http_parser
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-21 14:28:26 -08:00
Dirk Hohndel
a69852e56d Add wrapper script to set up Android build
This then runs the script under packaging/android.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-21 14:27:49 -08:00
Dirk Hohndel
3fd26a80dc Small fix for Android build.sh
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-21 14:27:38 -08:00
Joakim Bygdell
dd2791fa1e Fix tankbar offset at gas switch event
When painting the tankbar the function triggers on change in cylinder index,
as a result the new gascolour are changed at the next sample time point.
On a divecomputer with a reasonable fast sample rate the 2-3s offset are hardly
noticable, especially on a longer dive.
For divecomputers with slow sample rate the 10-30s offset are clearly visible.

This is fixed by start painting the new gascolour at the time point of the switch event rather than the time point of the next sample.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-01-21 06:07:31 -08:00
Joakim Bygdell
f7cecf506f Don't let the tankbar overlap the tissue heatmap
Shift the position of the tankbar to prevent it from overlapping the tissue heatmap

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-01-21 06:07:31 -08:00
Robert C. Helling
dbf1390094 Only set surface pressure when it has a value
When replanning a dive, do not set the surface pressure when it is 0.
Same for salinity.

This closes #161 .

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-01-18 06:50:01 -08:00