Commit graph

10437 commits

Author SHA1 Message Date
Dirk Hohndel
a9cf089e1c QML UI: remove verbose option from Developer menu
We now log everything that's relevant to the application log that is shown
in the UI.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24 16:37:23 -07:00
Tomaz Canabrava
5f9df02ffc Fix tests linkage
I wasn't linking the tests against the qrc library, which made trying to
load the xslt transformation files for the parse test fail.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24 16:32:38 -07:00
Dirk Hohndel
f298802b99 QML UI: GPS location service - correctly calculate the delta
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24 11:50:51 -07:00
Dirk Hohndel
b1037abdb7 QML UI: GPS location service - only show the fixes we store
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24 11:50:46 -07:00
Dirk Hohndel
9a62685f0b Read GPS location service thresholds from settings
We used to faithfully save them, but not restore them at start.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24 11:18:20 -07:00
Dirk Hohndel
6c9247b56b QML UI: improve About screen
This should actually give a correctly positioned logo.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24 09:44:05 -07:00
Dirk Hohndel
aa4e3ba537 Give more information about the GPS location service
On iOS it seems that I get a fix every second. Even though the
QGeoPositionInfoSource is set up with an update interval of 5 minutes...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24 08:49:45 -07:00
Dirk Hohndel
2a65eab745 iOS build: add another Info.plist key to enable positioning
This key is needed so that the iOS app asks the user for permission to use the
GPS position information.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24 07:54:48 -07:00
Dirk Hohndel
78a8137963 iOS build: enable access to GPS location
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-24 05:41:44 -07:00
Dirk Hohndel
f9e68f13f3 iOS build: add missing icon
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 23:31:12 -07:00
Dirk Hohndel
854eb57ef5 QML UI: always convert the cloud user name to lower case
Mixed case user names cause the connection to the cloud storage to fail.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 23:12:03 -07:00
Dirk Hohndel
fcb93362ac QML UI: reduce application log clutter
We don't need to flood this with the profile scaling data anymore; that's
hopefully fixed for good.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 21:22:55 -07:00
Dirk Hohndel
b16e8e7b4e QML UI: work around missing back button on iOS
Especially when showing the dive details and editing dive details,
having the option to go back in the context menu is nicer on iOS.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 21:15:01 -07:00
Dirk Hohndel
fb157b873a iOS build: fix executable name
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 19:45:07 -07:00
Dirk Hohndel
509b664a29 Another small signed / unsigned warning fix
This is in the Mac support file that wasn't compiled on Linux when I tried to
finish the cleanup.

Now this compiles without warnings on Mac and iOS as well.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 17:26:46 -07:00
Dirk Hohndel
788d65a527 Make code easier to read (and avoid warning)
The old expression wass correct because if dive_table.dives[j]->number is != 0,
then !dive_table.dives[j]->number is 0 and vice versa. But come on...
The new code seems much more natural and easier to read.
And of course the Apple compilers by default gave a warning because they
suspected a precedence bug with the old code.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 17:26:46 -07:00
Dirk Hohndel
41bc8003d5 iOS build: update the README
A lot of this is still black magic, but at least this now documents what I
understand about the process.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 17:26:46 -07:00
Dirk Hohndel
a4a9edcd0f iOS build: create Info.plist with correct version information
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 17:26:46 -07:00
Dirk Hohndel
9028c807b2 Change names of iOS build files
The name subsurface-ios was used in many places and that was just not helpful
to fight against. This should work much better.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 17:26:46 -07:00
Dirk Hohndel
32e6cde548 Compare with the right git sha when deciding nothing has changed
The saved_git_id could be updated in is_git_repository() under certain
circumstances, so we need to make sure we compare to the sha that was
current as we entered this function. Since the pointer is just to a static
buffer we need to actually copy it (and then free it later).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 13:25:10 -07:00
Werner Macho
23ea947b5a 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 12:16:56 -07:00
Dirk Hohndel
aef6364921 Prevent possible SIGSEGV in test
If the load fails the get_dive(1) could return NULL. Let's catch that as
an error instead of having the test crash.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 12:12:11 -07:00
Dirk Hohndel
cc0f298980 When clearing dive file data, forget the saved git sha
Otherwise parse_file() thinks that this data has already been loaded and
doesn't re-read it, even though our internal data structures have been
erased - so a subsequent parse_file after clear_dive_file_data() that
opens the same git repository finishes successfully, but leaves the
dive_table empty which is of course incorrect.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 12:09:18 -07:00
Dirk Hohndel
bff3588c25 Undo two more unsigned changes that are no longer needed
With this master should compile without signed / unsigned warning,
hopefully without any more breakage.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 10:11:39 -07:00
Dirk Hohndel
0cd0762807 Another attempt to clean up signed / unsigned in profile.c
This time we err on the side of signed variables most of the time.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 10:04:30 -07:00
Dirk Hohndel
22c94a3e65 Don't try to force depth to be unsigned
Trying to clean up the signed vs. unsigned issues it becomes clear that
forcing depth to be unsigned causes way too many problems in the code.

So this commit goes the opposite direction; since we clearly aren't
limited INT_MAX vs UINT_MAX, simply make more of the depth related
variables signed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 09:53:44 -07:00
Robert C. Helling
e93c99c8bc 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 09:34:49 -07:00
Dirk Hohndel
0ae5f6faae Revert "Clean up signedness confusion in planner.c"
This reverts commit 59299f0ab3.

Doing this oversimplified "fix" actually breaks the planner.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-23 08:17:17 -07:00
Dirk Hohndel
abb3b03511 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:41:15 -07:00
Robert C. Helling
48007ebc30 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:16:38 -07:00
Dirk Hohndel
e8f8051efe QML UI: use consistent, darker text color for dive list
We received suggestions from users to darken the text color in the dive
list a bit and this does seem to be a lot more readable. Especially since
people are likely to use this outdoors the higher contrast seems
reasonable.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-22 11:36:11 -07:00
Anton Lundin
77e1c2afa9 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-22 08:46:40 -07:00
Miika Turkia
ee0bdd9043 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:45:04 -07:00
Rick Walsh
cbd332fbcc 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:31:13 -07:00
Dirk Hohndel
47ba8b38d4 Preferences: fix missing slot problem when creating new account
This is still a left over from the damage done when creating the
preferences objectification.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-19 07:52:33 -07:00
Rick Walsh
0e5c8f101c Planner: add segment symbol to output table
Add a symbol to each line of output table indicating whether a segment is an
ascent, descent, constant depth (user entered) or deco stop

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2016-03-19 10:45:37 +01:00
Jeroen Massar
cfd3d8868b 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 09:00:50 -07:00
Jeroen Massar
0ddfd3a992 Detect Homebrew Qt5
And 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 09:00:31 -07:00
Jeroen Massar
4a8619349a 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 08:59:37 -07:00
Dirk Hohndel
ed9e5fe0f3 Don't use CRLF in documentation files
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-16 07:46:47 -07:00
Robert C. Helling
e32ae20ca3 Fix loading images from URLs
This was broken when introducing loading images from the server. Now it first tries the
server and if that fails tries the actual URL.

Still, the image does not show up immediately, since the DivePictureModel is
unavailable to the image downloader to be told to update the images.

This needs to be fixed but in the mean time, the image is shown when the dive
is reselected (possibly on the next run) since it is then loaded from the cache.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-16 07:46:28 -07:00
Robert C. Helling
8a59d78faa When handing off a picture to a worker thread, copy it first
as otherwise we crash when the picture is freed before the
worker thread (to load from the net or to compute hashes)
is finished

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-16 07:46:28 -07:00
Robert C. Helling
3c7e14a18f 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-16 07:46:28 -07:00
Robert C. Helling
49bcbf39d5 Replace ~ by $HOME in build.sh
Somehow the file test with ~ interpolation does not work

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-16 07:46:28 -07:00
Dirk Hohndel
b02b76aea0 Bump Subsurface-mobile version
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-13 18:24:29 -07:00
Dirk Hohndel
dca6eaa089 Use more informative error message in application log
While on the desktop we show the error to the user, in Subsurface-mobile
it's only appended to the log; so in order to improve debuggability it
makes sense to show the full error there.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-13 18:22:54 -07:00
Salvador Cuñat
27524248cc mobile-manual - Update authors, dates and so
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-13 12:46:43 -07:00
Salvador Cuñat
b7848cc9c9 Spanish translation for mobile-manual.txt
[Dirk Hohndel: also added an html version]

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-13 12:46:17 -07:00
Linus Torvalds
fb5ce88b81 gas model: update to new coefficients, and simplify expressions
This updates the gas model to use the new virial coefficients from the R
script, and simplifies the expression a tiny bit by avoiding the
division by 1000 for the gas fractions, and replacing it with a multiply
by 0.001 at the end.

The virial coefficients for Oxygen and Nitrogen changed in the last
digits due to the use of a different tool for the least-square fitting.
That also accounts for the change in format (the coefficients are not
using scientific notation).

The coefficients for Helium changed noticeably more, since they are now
based on the new least-squares fit from the raw data.

But the actual end result does not change appreciably, the main
advantage is that now the numbers are easily reproducible.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-13 12:43:35 -07:00
Linus Torvalds
6b5e22a68e gas model: add proper He compressibility data and do a least-squares fit
Lubomir pointed to exactly where he got his data from, so I added that
raw Helium data to the R script, and let the least-squares fit just take
care of the interpolation between 273K and 323K.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-13 12:43:30 -07:00