Commit graph

12525 commits

Author SHA1 Message Date
Dirk Hohndel
605400a029 DC download: don't clear message if no dives downloaded
Otherwise the text telling the user that no new dives were
found will be deleted right away.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-17 14:49:37 -07:00
Dirk Hohndel
731d9dc9bd DC download: tell user when no new dives were found
Otherwise it almost looks like something went wrong with the download.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-17 14:46:44 -07:00
Dirk Hohndel
90d73924c2 BLE: try to pick the correct descriptor to write to
The ordering on Mac appears to be random, but after looking through the
various successful logs of BLE downloads, it seems we always wrote to the
ClientCharacteristicConfiguration descriptor. So try to find that one first,
and only grab the first descriptor in the list if we didn't find a
ClientCharacteristicConfiguration descriptor.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-17 09:58:11 -07:00
Dirk Hohndel
26e610c3f4 BLE: create controller from QBtDeviceInfo
Creating it from an address is a) deprecated and b) impossible on Mac or iOS.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-17 09:58:11 -07:00
Dirk Hohndel
db38a7023d BLE: helper function to get QBtDeviceInfo from UUID
Right now this will only work if you scan for your BLE dive computer every
time. Ideally we should simply initiate a scan and look for that address if
it's not found in the hash.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-17 09:57:57 -07:00
Dirk Hohndel
e5b7fb74b4 BLE: on Mac/iOS use UUID instead of address
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-17 09:56:28 -07:00
Dirk Hohndel
5695ef956b BLE: if there's no address, use the UUID instead
This is not just for IOS, the same applies on a Mac. But I see
no issue with enabling that for all OSs.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-17 09:54:04 -07:00
Dirk Hohndel
08e4d2dc5e cmake: enable BLE on Macs
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-17 09:54:04 -07:00
Dirk Hohndel
2d2bb95482 Mac packaging: add option to make bundle without creating DMG
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-17 09:54:04 -07:00
Robert C. Helling
58b7c6f8ef Don't comput plan variations when not in the planner
Fixes #565

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-09-16 08:36:59 -07:00
Stefan Fuchs
dc0f011920 Correct incorrect variable qt_version instead of QT_VERSION in build.sh
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-09-16 08:36:30 -07:00
Stefan Fuchs
19df57d7d3 Remove some very small marble leftovers
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-09-16 08:36:30 -07:00
Lubomir I. Ivanov
5eeefbff8b mapwidgetcontextmenu: use a QtQuick 2.0 import
Following on beb0d5703a, the context menu seems to work fine
with a much older QtQuick import - version 2.0.

The 2.7 import is technically a development leftover
and a minimal version should have been considered earlier.

On older Qt setups (e.g. 5.5.x) this might throw a:
'module "QtQuick" version 2.6 is not installed'

Reported-by: Stefan Fuchs <sfuchs@gmx.de>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-09-16 08:35:29 -07:00
Dirk Hohndel
5e1ad4948e latest translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-15 22:00:13 -07:00
Dirk Hohndel
5e3bf0b4fa Update translation source strings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-15 21:24:54 -07:00
Stefan Fuchs
8d8e694b0d End tankbar at the correct end of the dive plot
Go back to the old startegy of retrieving the correct end of the dive
plot by looking at the plot data instead of looking at dc->duration.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-09-15 09:01:10 -07:00
Stefan Fuchs
803e98befe MXE build script: Mention googlemaps plugin in comments
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-09-15 08:58:19 -07:00
Stefan Fuchs
26d9944013 MXE build script: Remove hint to use old MXE version
Meanwhile (after removing marble) it seems to be a good choice to use
latest MXE version with currently Qt 5.9.1.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-09-15 08:58:19 -07:00
Seppo Takalo
a2a1dfdf9f Use dive ID instead of dive number when importing from Shearwater db
Dive IDs are unique but same dive number can appear multiple times within
the same database. This can happen for example when user changes the
"next log number" from his computer.

Signed-off-by: Seppo Takalo <seppo.takalo@iki.fi>
2017-09-15 08:57:03 -07:00
Seppo Takalo
f7db0c705b Convert usage of atof() to strtod_flags()
The provided strod_flags(str, 0, 0) should work as a drop in replacement
for atof() but does not care about locales which may cause atof() to fail.

strtod_flags() would allow checking of conversion result, but I did not
change the existing logic. This was just regexp search&replace change
to get rid of atof(). I use flags 0 to get more relaxed conversion.

Fixes #574

Signed-off-by: Seppo Takalo <seppo.takalo@iki.fi>
2017-09-15 08:57:03 -07:00
Dirk Hohndel
d37bb466fe First stab at ReleaseNotes for the next version
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-15 08:50:15 -07:00
Linus Torvalds
e94af2c0b7 Properly clear sensor pressure data for synthetic plotinfo entries
We only cleared the first sensor data when we created new synthetic plot
info entries, because we only used to have one (well, we had the o2
data, but apparently nobody ever noticed that it didn't get properly
interpolated, probably because people who have CCR dives with o2
pressures are few, and the pressure drops are gradual anyway).

Clear all the pressure data, so that the interpolation code doesn't
think we have some existing real sensor data for the plot info entries
in between proper sample entries.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-15 16:29:00 +02:00
Linus Torvalds
41bbae31f5 xml: save the right sensor pressure when we have multiple sensor readings
The XML saving code got the multi-sensor case completely wrong, because
it still had one place where it would always save the first pressure,
rather than the pressure from the right sensor.

This was hidden by the fact that old data would be saved using the
legacy model that only ever used the first sensor slot.  Only if you
actually had multiple sensor slots used would the bug trigger.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-15 16:28:07 +02:00
Miika Turkia
a8ce78bf77 Refine cylinder usage tests
Consider cylinder used also if the first and last sample pressure differ
enough

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-14 07:33:55 +02:00
Dirk Hohndel
96ed09bf14 Update the tankbar code to work with the new gas handling
When Linus modified the gas handling code six weeks ago he pointed out
that that had broken the tankbar; with this patch we now simply walk the
gas changes of the displayed dive directly and create the tankbar
rectangles from that information.

See #562

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-14 05:36:52 +02:00
Linus Torvalds
6769e21441 Make the info window show all the pressures we have
We used to only show the first pressure we had, from back when we only
supported a single sensor.

Reported-by: Stefan Fuchs <sfuchs@gmx.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-13 14:05:26 -07:00
Miika Turkia
baa60e1077 Support for 2 cylinders on Shearwater XML import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-09-13 14:04:31 -07:00
Miika Turkia
5afa5ed9f1 Detect dive mode on Shearwater DB import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-09-13 14:04:31 -07:00
Tomaz Canabrava
19db825240 Facebook support: fix export dialog layout
Dialog layout was broken, now we can actually resize.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2017-09-13 09:36:22 -07:00
Tomaz Canabrava
e43a116457 Facebook support: use the new Graph Api
This is basically a one liner.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2017-09-13 09:36:09 -07:00
Seppo Takalo
850917d41d Don't assume CCR mode when importing from Shearwater
Logic was assuming CCR mode if field "averagePPO2" was present.

Signed-off-by: Seppo Takalo <seppo.takalo@iki.fi>
2017-09-13 07:57:45 -07:00
Seppo Takalo
ba854a8cc5 Fix cylinder changes when importing from Shearwater database
Re-do the logic to use add_gas_switch_event() instead of creating event
manually.

Fix the SQL query to find the proper dive id from dive log number.

Signed-off-by: Seppo Takalo <seppo.takalo@iki.fi>
2017-09-13 07:57:45 -07:00
Seppo Takalo
83c9ad35a6 Fix Shearwater cylinder detection logic
Fix the SQL query to find proper dive id instead of assuming log number to
be the same as id.

Signed-off-by: Seppo Takalo <seppo.takalo@iki.fi>
2017-09-13 07:57:45 -07:00
Seppo Takalo
6509f2ed9f Ignore missing pressure values when importing from Shearwater
Shearwater seems to report missing AI sensors as a pressure reading
4092 (raw) which is 564 bar.

Signed-off-by: Seppo Takalo <seppo.takalo@iki.fi>
2017-09-13 07:57:45 -07:00
Miika Turkia
e25cecf37c Inform user if there was no dive profile in DL7/ZXU file
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-09-11 07:21:43 -07:00
Miika Turkia
f3ab2ee674 Fix crash on manually added ZXU/DL7 file
The CSV import crashed if the input file had no samples in it.

Fixes #566

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-09-11 07:21:43 -07:00
Miika Turkia
40cc0b0e4b Import dive number from DL7 log
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-09-11 07:21:43 -07:00
Miika Turkia
5b5cab2905 Do not merge dives with zero duration
As these are probably manually entered dives with incomplete data, it is
better not to merge them.

See #561

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-09-11 07:19:57 -07:00
Miika Turkia
25fc72e22f Do not save non-existent time
Note that git storage still encodes the time into file name.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-09-11 07:19:57 -07:00
Miika Turkia
d7c89a79f8 Do not save duration if it is zero
See #561
2017-09-11 07:19:57 -07:00
Miika Turkia
15ef53fb80 Do not save heartbeat to XML if it has not changed
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-09-11 07:19:57 -07:00
Miika Turkia
643085f992 Do not save bearing to XML if it has not changed
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-09-11 07:19:57 -07:00
Dirk Hohndel
9576a9ba8a Add Cochran dive computers to FTDI list
Based on information from John Van Ostrand <john@vanostrand.com>.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-06 08:35:39 -07:00
John Van Ostrand
866a25f90e Implemented serial_set_break for FTDI
Setting break is required to wake up Cochran DCs (it doesn't make
sense to me, but it's needed).

Signed-off-by: John Van Ostrand <john@vanostrand.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-06 08:30:48 -07:00
John Van Ostrand
166eb17ac2 Changed serial_ftdi flush to a reset if DC_DIRECTION_ALL
The USB reset flushes both buffers, but it also solves a problem
waking up a Cochran DCs.

Signed-off-by: John Van Ostrand <john@vanostrand.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-06 08:30:40 -07:00
John Van Ostrand
928621357c Changed backoff strategy for short reads.
Back off was exponential starting at 10ms, which for high baud
rate and no flow-control connections might cause buffer overrun.
This was causing problems when reading Cochran DCs, the hearbeat
byte was being missed.

Signed-off-by: John Van Ostrand <john@vanostrand.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-09-06 08:30:21 -07:00
Lubomir I. Ivanov
024b61ca04 update INSTALL and Readme.ubuntu to exclude Marble
Remove Marble mentions from said files.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-09-04 07:46:35 -07:00
Lubomir I. Ivanov
2334a542cf remove the marbledata assets folder
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-09-04 07:46:35 -07:00
Lubomir I. Ivanov
da3288590e remove Marble cmake modules
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-09-04 07:46:35 -07:00
Lubomir I. Ivanov
2b40e15713 remove Marble from packaging and build scripts
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>

---
please note, that i have no way to test most of the scripts ATM.
2017-09-04 07:46:35 -07:00