Commit graph

11499 commits

Author SHA1 Message Date
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
Dirk Hohndel
4f935595d9 QML UI: make return to dive list work when entering credentials
If the user tapped on the "Cloud credentials" menu and wants to go back to the
dive list (by selecting that option from the menu), allow them to do so if they
previously had valid credentials.

This allows them to go back to the dive list even on a device without a back
button like an iOS device.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-13 11:41:09 -07:00
Dirk Hohndel
8dcb6fa25c QML UI: show user manual in browser window
This is so obvious... and I know others asked for this before. Should
definitely have been in the first version...

Fixes #1026

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-13 11:13:04 -07:00
Dirk Hohndel
087cda05e6 QML UI: font color isn't supported on app log page
So let's remove all that markup.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-13 08:58:57 -07:00
Dirk Hohndel
3efa20820a QML UI: show cloud access notification when refreshing from menu
If the user requests a refresh we always try to access the cloud and need to
show the notification accordingly.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-13 08:56:29 -07:00
Linus Torvalds
fcf1898b0c gas-model: add R compressibility script
It annoyed me that we hand-waved a bit about how the virial factors were
actually computed in the gas-model.c file, so here's an actual R script
that computes them and plots the results.

You can run it with (for example):

    R --vanilla < compressibility.r

and it will generate a Rplots.pdf of the plots, and the coefficients
will be shown on stdout.

The result actually differs in insignificant ways from the values that
Lubomir computed, which is likely just due to tools.  I used R, Lubomir
seems to have used

    http://polynomialregression.drque.net/online.php

but the actual curve is pretty much the same.

NOTE! R is not entirely happy about the non-linear fit of the Helium
curve: the fit is *so* precise that it failes the R relative-offset
convergence criterion.  That is apparently generally a sign of
artificial data.

That is probably because Lubomir generated them from the linear mix of
two polynomial fits, rather than a linear mix of the original data.  But
maybe the original data was artificial?

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-13 08:32:21 -07:00
Miika Turkia
6bcfb033ee 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-13 08:31:30 -07:00
Guillaume GARDET
c8df5625d4 Documentation: add mobile user manual to POT/PO management and update french translation of user-manual and mobile-manual
Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-12 06:46:03 -08:00
Dirk Hohndel
343e8e3df6 Another bump to the Subsurface-mobile version number
Hopefully this is the one we can release.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-11 13:26:51 -08:00
Dirk Hohndel
f1d73606e5 QML UI: don't allow negative gas consumption
If end pressure is higher than start pressure, simply use the same start
and end pressure.

Fixes #1024

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-11 13:17:57 -08:00
Dirk Hohndel
5a83226aa8 QML UI: try to clean up UI before showing notification
This way we shouldn't have a drawer or other changes to the UI prevent the
user from seeing / interacting with the notification.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-11 10:10:13 -08:00
Dirk Hohndel
c4fb42f8ad QML UI: sort GPS fixes correctly
That was silly. We have the GpsWhenRole specificly for sorting and then
didn't use it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-11 07:26:42 -08:00
Dirk Hohndel
26c2dea46c Bump Subsurface-mobile version
Even though 1.0.0 was never released publicly, it was offered to beta
testers, so it is good practice to bump the version number for the next
binary that I'll push to them. Even if the build number would of course be
different.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-10 22:19:21 -08:00
Dirk Hohndel
8224b87b7a QML UI: don't claim to be accessing the cloud when you are not
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-10 22:17:23 -08:00
Tomaz Canabrava
fcb308fdf2 Red error messages in QML
[Dirk Hohndel: slightly changed to make it easier for translation plus
               added one missing string that needed to be marked]

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-10 22:14:58 -08:00
Dirk Hohndel
ba89d9bbb1 QML UI: correctly validate the gasmix entered
We parsed it correctly, but then compared the permille values against
percent thresholds. What a stupid bug.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-10 22:03:00 -08:00
Dirk Hohndel
969ca3d9ea QML UI: if the date entered doesn't match the format, try harder
This implements a bunch of standard date and time formats, hoping that
what the user entered matches one of them.

I guess in the end we need to find decent calendar/clock based widgets to
enter the time and avoid the whole parsing hassle.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-10 18:36:46 -08:00
Dirk Hohndel
3be6b128fd QML UI: hide some profile scaling debug messages
Simply make things less verbose

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-10 18:02:36 -08:00
Dirk Hohndel
9d6c755f48 QML UI: keep cloud access notification until done
Instead of having the notification disappear after five seconds, keep it
visible until we are done accessing the cloud. That seems to be more
intuitive.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-10 18:00:44 -08:00
Dirk Hohndel
d1247ba19c Small update to the mobile user manual
Also switch the mobile user manual html over to something created on my
machine and (as usual) named .html.git

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-10 09:00:31 -08:00
Dirk Hohndel
d9c3fc9946 Revert "Clean up signedness confusion in gaspressures.h"
This reverts commit 7d1c2a142f.

Another one.
2016-03-10 07:40:15 -08:00
Dirk Hohndel
a678cba93a Revert "Clean up signedness confusion in profile.c"
This reverts commit 7f2ad93396.

Idiot maintainer to do cleanup like this right before a release
2016-03-10 07:37:18 -08:00
Dirk Hohndel
557eb744a3 Make sure version is freshly generated before extracting
Oops, so Subsurface-mobile 1.0 (4.5.2.1048)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-10 06:35:40 -08:00
Dirk Hohndel
6be0800704 Update Subsurface-mobile version to 1.0.0
And make sure the version displayed for Android includes both that version
and the build version, which is our regular canonical 4 part version
number - so this release will be something like "1.0.0 (4.5.2.1047)"

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-10 06:29:26 -08:00
Marco Martin
2480f21e5b correctly build on android 2016-03-10 14:40:19 +01:00
Dirk Hohndel
4ceb65938a Silence warnings in testplan.cpp
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09 21:50:37 -08:00
Dirk Hohndel
c2e1619cd1 Silence warnings in testparse.cpp
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09 21:50:37 -08:00
Dirk Hohndel
44d715759c Silence warnings in facebook_integration.cpp
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09 21:50:37 -08:00
Dirk Hohndel
1a54e42f3d Fix cmake for libssh2 1.7 and later
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09 21:50:37 -08:00
Dirk Hohndel
09532d0463 Silence warnings in printdialog.cpp
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09 21:50:37 -08:00
Dirk Hohndel
54757fb694 Silence warnings in locationinformation.cpp
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09 21:50:37 -08:00
Dirk Hohndel
eb09b79dc5 Silence warnings in configuredivecomputerdialog.cpp
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09 21:50:36 -08:00
Dirk Hohndel
ac7540b164 Silence warnings in divelogexportdialog.cpp
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09 21:50:36 -08:00
Dirk Hohndel
60ee897b29 Remove unused member function
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09 21:50:36 -08:00
Dirk Hohndel
b8fbf72182 Silence warnings in divelogimportdialog.cpp
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09 21:50:34 -08:00
Dirk Hohndel
b4bb1321bf Silence warnings in subsurfacewebservices.cpp
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09 21:50:27 -08:00
Dirk Hohndel
b973d988dc Silence warnings in starwidget.cpp
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09 21:50:27 -08:00
Dirk Hohndel
a670181ed2 Silence warnings in simplewidgets.cpp
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09 21:50:27 -08:00
Dirk Hohndel
ee7b9dcd09 Silence warnings in modeldelegates.cpp
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09 21:50:26 -08:00
Dirk Hohndel
071e6dbd6f Silence warnings in mainwindow.cpp
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09 21:50:26 -08:00
Dirk Hohndel
8d19a6ae16 Silence warnings in downloadfromdivecomputer.cpp
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-09 21:50:26 -08:00