aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-06-01Use #if defined() instead of #ifGravatar Jan Mulder
qtcreator (4.3.0) got confused whether BT_SUPPORT was defined. Using work as expected. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-05-31Android BT download: hardcode UUIDGravatar Dirk Hohndel
While it seemed logical to use the advertized service UUID that doesn't appear to be working - instead using this hard coded UUID seems to do the trick. I now did a successful download from my Shearwater Petrel. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-31Cochran import: Removed long tail of 0 depth from profileGravatar John Van Ostrand
The Cochran logs the first 10 to 20 minutes (configurable) of surface interval in case the diver re-submerges. Signed-off-by: John Van Ostrand <john@vanostrand.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-31Cochran import: better support for older modelsGravatar John Van Ostrand
Older models allowed for configuration sample frequency; This patch adds detection of sample frequency (profile_period) for cochran log file imports. Signed-off-by: John Van Ostrand <john@vanostrand.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-31Android BT: use NoSecurity for connectionGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-31QML UI: try to also detect OSTC BT dive computersGravatar Dirk Hohndel
The naming scheme of OSTC dive computers doesn't match their product names, but they all behave the same from a download perspective, so we assume that any BT device that has a name starting with OSTC is an OSTC 3. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-31Android build script: use interactive SDK installGravatar Dirk Hohndel
And then manually fix the license as that doesn't appear to work correctly in the tool. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-31Android build script: update for Qt 5.9Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-31Android: connect to BT via uuid instead of portGravatar Dirk Hohndel
We remember the offered service uuids as we detect the device and then try the first one - likely this needs to be fixed / tuned to pick the right one if multiple uuids are offered. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-31QML UI: use the BT address of the first dive computer foundGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-31QML UI: add getBtAddress functionGravatar Dirk Hohndel
This allows us to get the BT address of the first dive computer that we found. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-31Don't override device name when using BTGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-30Import NDL from Shearwater DesktopGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-05-30Fix Shearwater import pressure dataGravatar Miika Turkia
Apparently recording cylinder pressure in PSI is not the only oddity with Shearwater Desktop. It also records half the value, so doubling the reading here. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-05-30Import pressure data for tank0 on Shearwater Desktop importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-05-29FTDI support: add minimal debugging outputGravatar Dirk Hohndel
Copied the libdivecomputer macros for convenience. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29Subsurface-mobile on Android: add USB intent filterGravatar Dirk Hohndel
With this a few FTDI based dive computers should be visible from the app. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29QML UI: populate dive computer vendor and productGravatar Dirk Hohndel
If we detected a BT dive computer, we can already set up the vendor and product for it (as well as the new BT checkbox). Oddly, in my tests this doesn't set up the product correctly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29QML UI: detect BT dive computersGravatar Dirk Hohndel
If we find something that looks like a known BT dive computer, set things up so that we can use it later. If multiple dive computers are found, simply use the first. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29Use magic 'ftdi' as device name on AndroidGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29QML UI: try to match BT names to known dive computersGravatar Dirk Hohndel
So far this just adds data to the log. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29QML UI: remove unused layoutGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29QML UI: select / unselect dive by clicking on itGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29QML UI: add DownloadDiveDelegateGravatar Tomaz Canabrava
A delegate to display the dives in a better way, based on the code from DiveList.qml Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29QML UI: remove unused item on the interfaceGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29QML UI: start BT discoveryGravatar Dirk Hohndel
So far all this does is list all the BT devices that it finds (and I worry if this will have negative battery implications on a mobile device), but this should allow us to connect to a standard BT dive computer (but that will of course require more code to pick the right device). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29Fix typoGravatar Dirk Hohndel
Don't manually edit diffs and then commit without compile test... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29QML UI: process freshly downloaded divesGravatar Dirk Hohndel
This way they get correctly prepared and derived data fields get populated. For example, the dive number gets updated if these are indeed the newest dives. Fixes #408 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29Don't leak memory on downloaded dives not pickedGravatar Dirk Hohndel
I noticed this in the mobile download code when fixing an unrelated issue - and then realized that the same was true in the desktop app as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29More optimal searchGravatar Jan Mulder
The linear search to determine that a just downloaded dive was already downloaded, started from the oldest dive in the logbook. It is, however more likely that a just downloaded dive is one of the most recently downloaded. So, just search backwards. Just a trivial performance improvement. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-05-29mobile: dive_table.preexisting not set importing from mobileGravatar Jan Mulder
Searching why the mobile app also downloads pre existing dives, it appears that in the mobile app, the preexisting attribute is 0, where it should be the number of dives before the download. This is easily solved by adding the correct setting on the download thread. This solves the issue of downloading pre existing dives. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-05-29mobile: Prevent tripping assert on empty BT downloadGravatar Jan Mulder
When (with mobile on desktop) loading from DC is called and the dive computer to connect to is not in download mode, the repopulate() function is called with an empty dive table. This trips the assert (obviously, debug compile only) in DiveImportedModel::setImportedDivesIndexes(). This simple fix makes things just more robust. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-05-28QML UI: add downloaded dives to dive listGravatar Dirk Hohndel
This already takes into account which of those dives were selected. Right now all we have is select all or none - this needs actual support in the UI, but once that's there, it will just work (famous last words). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-28Fix abort when Bluetooth mode is defaultGravatar Jan Mulder
Commit dec47e11cd3 introduces a SIGSEGV in case the user has Bluetooth download selected from its previous sessions. Accessing the "Import from dive computer" crashes immediately. Reverting a small part of commit dec47e11cd3 solves this. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-05-28QML UI: stub out saving downloaded divesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-28QML UI: add some DC Download info to AppLogGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-28QML UI: fix typo in component idGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-28QML UI: remove code that's commented outGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27Android build: rely on KEYSTORE environment for release buildGravatar Dirk Hohndel
With the gradle build it seems we automatically get a Debug build unless the keystore is defined. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27Update Android build scriptsGravatar Dirk Hohndel
- prepare for Qt 5.9 - remove references to ANT - adjust to changed location of the resulting apk Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27QML UI: use QtQuick.Controls 2.0 everywhereGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27Fix build errorGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27Random whitespace cleanupGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27QML UI: add the Downloaded Dive ModelGravatar Tomaz Canabrava
Still to do: - select the dives to save - record the downloaded dives but download is already working. :) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27QML UI: add the DownloadThreadGravatar Tomaz Canabrava
For this I had to also make the DCDeviceData accessible, and for that it needed to be a pointer. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27Set descriptor when starting thread.Gravatar Tomaz Canabrava
Set the descriptor when starting the thread, this removes code from the desktop code and makes everything in sync always. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27Reduce the scope of variablesGravatar Tomaz Canabrava
Those variables should have local scope, not class scope. We are using it only inside of pickDump/LogFile metohds. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27Extract the device_data_t into helper classGravatar Tomaz Canabrava
Keeping the Desktop and QML versions of Subsurface using the same codebase will keep the code saner, this change makes the Desktop version use the DCDeviceData helper sturct that encapsulates the device_data_t member for easy access on the QML. This also helped move a bit of initializations from the UI to the Core - and that's always good. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27New class DCDeviceDataGravatar Tomaz Canabrava
this class encapsulates the device_data_t from libdivecomputer in a way that permit us to use it on QML. this will be needed to prepare the data for the download thread. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27Display the dialog correctlyGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>