Commit graph

12037 commits

Author SHA1 Message Date
Dirk Hohndel
0c5f373ec0 Latest translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-11 21:21:11 -07:00
Dirk Hohndel
b9f691a700 Merge branch 'hw-o-ble-2' of https://github.com/janmulder/subsurface
Doing a manual merge from the command line in order to retain Jan's SHAs
so that the commit message makes sense...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-11 20:32:48 -07:00
Dirk Hohndel
45f36e251b Update translation source strings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-11 20:31:17 -07:00
Jan Mulder
fbaaa64a4a Trivial code cleanup
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-07-11 17:11:49 +02:00
Philippe Massart
987fadcfb5 French documentation translation
Mostly documentation about manually added dive.

Signet-off-by: Philippe Massart <philippe@philmassart.net>
2017-07-11 22:18:00 +09:00
Philippe Massart
271a57b2ff French translation (more to come) 2017-07-11 22:18:00 +09:00
Jan Mulder
8911281593 OSTC over BLE: read a long as needed
See also b409e9fc91 and 709c1df2af. The OSTC parser
cannot handle reads of single 20 byte BLE packages in serial mode.
Instead of doing a deeper down agressive read, we can read on
the serial level more subtile. As the parser is requesting a
specific number of bytes, we just read that number of bytes and
return them. As the 20 byte BLE packets do (obviously) not
align with the reading requirement of the libdc parser, a little
housekeeing needs to be done in between individual reads.

CAVEAT 1: In contradiction to 709c1df2af, this is supposed to
work for all parsers that properly specify the needed bytes to fetch.

CAVEAT 2: All above tested on Linux Desktop with bluez stack.
Subsurface mobile is step 2.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-07-11 13:41:21 +02:00
Jan Mulder
b409e9fc91 BLE read: remove aggressive read
Commit 709c1df2af introduced a hard blocking read for BLE devices.
This did break BLE reads from multiple DCs, and (in hindsight) was not
a correct implementation. It would require, for example, dynamic
read buffers as especially profile data grows with dive time, and
in addition, and more importantly, also the OSTC libdc parser cannot
process the entire profile of a dive at once (but likes to receive
it in 1K blocks). So, basically, it introduced issues, and did not
solve the OSTC read.

This commit reverts this hard blocking read (and as such will break
OSTC BLE reads). But it enables removal of the special cases for
the EON Steel and G2.

A next commit will solve OSTC BLE reads.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-07-11 13:29:41 +02:00
Jan Mulder
b7057c414f OSTC over BLE: take care of credits
Handle credits. Do not just ask for maximum credits all the time as this
will stop the download. Also do not let the credits go back to 0 (while
this might work, this is not tested). Getting back the 0 credits stops
the download, and even when it can be restarted, it is less efficient
(and not needed). Notice also that it takes some time before a grant
request is honoured. During testing I saw reception of up to 25 packets
between request and grant. So a lower bound for the request of
32 packets seems resonable.

One aspect the Telit/Stollmann TIO puzzeled me. Sections 4.1 and 4.2
both talk about credits, but my hyphothesis is that there are two
credits counters in play. One for traffic either way. This commit
only deals with credits granted by Subsurface to the OSTC to send
data. Credits granted by the OSTC to allow Subsurface to send new
commands is NOT part of this commit, and is seemingly not needed
in our scenario. As we only send new commands to the OSTC when
a previous one is finished (per HW's interface spec), the OSTC
does not run out of credits to receive commands.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-07-11 13:17:00 +02:00
Dirk Hohndel
d233725519 Whitespace change
No code change at all.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 21:11:37 -07:00
Dirk Hohndel
3a7ecc1a7f QML UI: make Preferences page scrollable
This commit only has the actual changes, the next commit will clean up
the white space in order to make it more obvious what was done.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 21:11:37 -07:00
Dirk Hohndel
6422932c61 QML UI: correctly wrap devinfo message
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 21:11:37 -07:00
Dirk Hohndel
7b922a1f72 QML UI: actually write libdc logfile
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 18:23:16 -07:00
Dirk Hohndel
dbb5826f2a QML UI: add preference for libdivecomputer log
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 18:08:36 -07:00
Dirk Hohndel
0a0c93e3b7 QML UI: add variable for libdc logfile
It seemed cleanest and easiest to have this in the QMLManager and
not in the DCDownload object.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 18:08:06 -07:00
Dirk Hohndel
ff659396c3 QML UI: fix typo in color values
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 18:06:12 -07:00
Dirk Hohndel
c59a74029b Android: write appLog to file
The trick is to pick a path that is accessible from other applications.
In theory QStandardPaths::GenericDataLocation should provide that.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 17:40:29 -07:00
Dirk Hohndel
e8b46039f6 Tell user if we reached a dive that was already there
This way it's more obvious why no dives were downloaded.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 16:29:16 -07:00
Dirk Hohndel
e6c2b14588 More meaningful device info display
While it's nice to have the numerical model in the logfile,
on the screen the user wants to see the dive computer product
name. And none of those hex numbers that make the text so long
that it becomes useless.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 16:09:04 -07:00
Dirk Hohndel
9111ce01e7 QML UI: show progress messages on the download page
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 16:07:48 -07:00
Dirk Hohndel
8e0895e429 QML UI: Download from DC: disable misleading UI elements
These buttons only work when we successfully downloaded a dive. Also, don't
show a list of dives when there are no dives.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 16:07:03 -07:00
Dirk Hohndel
f67b3a9852 DiveImportedModel: be consistent with last = -1
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 16:04:31 -07:00
Dirk Hohndel
fd96daca6a QML UI: add progress message variable
To be shared between C/C++ and QML code in order to show the updates
and potential error messages from libdivecomputer.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 15:07:44 -07:00
Dirk Hohndel
8e5c211e21 Revert "Add support for tank sensor battery for Perdix AI"
This reverts commit ed43b5dced ("Add
support for tank sensor battery for Perdix AI") since a much better
solution to get to that information has been implemented in
libdivecomputer.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 14:46:42 -07:00
Dirk Hohndel
d2a5bf87c4 QML UI: add dev_info data to AppLog
This should make it easier to tell how far we get downloading data
from dive computers.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 12:50:22 -07:00
Dirk Hohndel
55df597994 BLE support: the G2 wants packages one at a time
Just like the EON Steel it doesn't want us to loop until all packages
have been received.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 11:57:32 -07:00
Dirk Hohndel
4b9ba4c367 Latest translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-08 16:21:34 -07:00
Dirk Hohndel
52d5172a70 Automate picking supported DCs on iOS and Android
We use a little script to create the code snippet. This script in return
relies on comments that were added to the latest libdivecomputer source
(in the Subsurface-branch).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-08 16:06:12 -07:00
Dirk Hohndel
1fd00a3f6d Update translation source strings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-08 14:54:36 -07:00
Willem Ferguson
a5bb8ae2b7 Update Subsurface-mobile user manual
[Dirk Hohndel: collapsed all of the commits into one]

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-08 14:38:29 -07:00
Joakim Bygdell
22a0ebe45d QML UI: Style the gps checkbox
Style the gps checkbos on the dive edit page so it follows
theme coloring.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-09 03:06:04 +09:00
Joakim Bygdell
4698b86b13 QML UI: Style the radio buttons
This styles the radio  buttons in the preferences pane
so they follows the theme colors.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-09 03:06:04 +09:00
Joakim Bygdell
4c4b72853c QML UI: Style the BT download checkbox
Style the checkbox to the themes primary color

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-09 03:06:04 +09:00
Joakim Bygdell
aa5060669c QML UI: Style Dive Details View
Change the accent colors in the dive details view
to match the theme colors.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-09 03:06:04 +09:00
Joakim Bygdell
b9a05e501b QML UI: Style DC download buttons
Style the button in the DC download dialog so they follow
the theme colors.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-09 03:06:04 +09:00
Joakim Bygdell
12ac75c7dd QML UI: Proper button color
Make the "map it" button follow the theme color.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-09 03:06:04 +09:00
Dirk Hohndel
b1f4a2975f QML UI: better icon for download from dive computer
Thanks to Davide for paying for professional icon design.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-08 10:29:10 -07:00
Dirk Hohndel
d5793ea6af If we detect a different model than expected, use it
This is useful if the underlying code in libdivecomputer can reliably
detect specific hardware models.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-08 09:57:21 -07:00
Dirk Hohndel
ed43b5dced Add support for tank sensor battery for Perdix AI
This is a bit awkward with a VENDOR event - but at the time the strings
are generated, we don't have the information, yet, that we need to
determine these values (we need the last sample parsed, but the strings
are created as part of the dive headers.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-07 13:48:24 -07:00
Dirk Hohndel
4834f51a73 BLE: reduce the noise of debug output
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-06 09:35:04 -07:00
Dirk Hohndel
c9c9a8390a QML UI: start BT discovery a tiny bit later
This way the AppLog starts with the name and version of Subsurface-mobile.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-06 09:34:37 -07:00
Dirk Hohndel
ce21c2a696 QML UI: drop AppLog title and add margin instead
The title was hidden under the title bar, anyway.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-06 09:34:37 -07:00
Dirk Hohndel
a8468caaa2 BLE: minor code cleanup
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-06 01:37:21 -07:00
Alex Blasche
bf3cc2f64b Make compile with Qt developer builds
subsurface/core/divesitehelpers.cpp: In member function 'virtual void ReverseGeoLookupThread::run()':
subsurface/core/divesitehelpers.cpp:128:12: error: invalid use of incomplete type 'class QDebug'
     qDebug() << "no reverse geo lookup; geonames returned\n" << fullReply;
            ^

Signed-off-by: Alex Blasche <alexander.blasche@qt.io>
2017-07-06 12:43:42 +09:00
Alex Blasche
868fb9d5a9 Enable building with standard Qt install path layout
In general this patch enables building of subsurface without being
forced to use the official Qt binary packages. This is particularly helpful
when having to debug Qt internals or having to deal with custom patches
on top of the official Qt releases.

The architecture dependent file path layout is only employed by official
Qt binary packages. They are the result of a reordering at package
generation time. If Qt was build for a single architecture, the standard
layout does not add the architecture specific top level patch for the resulting
binaries.

Signed-off-by: Alex Blasche <alexander.blasche@qt.io>
2017-07-06 12:43:11 +09:00
Alex Blasche
db8200a9c3 Remove obsolete QT5_ANDROID_BIN
Signed-off-by: Alex Blasche <alexander.blasche@qt.io>
2017-07-06 12:43:11 +09:00
Dirk Hohndel
a4bb61b58a BLE download: EON Steel doesn't want to loop over reads
This seems a bit brutal, but it does the trick and makes EON Steel
downloads work again.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-04 09:30:05 -07:00
Dirk Hohndel
8a1f5b9566 BLE: write confirmation isn't HW only
Happens on the Suunto EON Steel as well.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-04 09:29:31 -07:00
Guillaume GARDET
2693735bb7 Documentation: Merge and update french translations
Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-04 07:48:28 -07:00
Jan Mulder
3cde4f594d Address code review
Addresses code review by Dirk. No functional changes.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-07-04 23:46:07 +09:00