aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
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>
2017-05-27QML UI: Fill the product listGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27QML UI: show the VendorList on the Download from DCGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27QML UI: fix the layout for the Download from DCGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27QML UI: initial code for Download from Dive ComputerGravatar Tomaz Canabrava
Add a new action on the drawer to display the Download from Dive Computer options. Nothing works yet. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27Move the fill_computer_list() out of widgetsGravatar Tomaz Canabrava
fill_computer_list() creates a Qt friendly structure that contains all of the necessary information about dive computers and it's devices, and it's needed both in Qml and Widgets to allow the user to download their dives. This patch makes it possible to use the code in QML without duplication. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27Separate the download thread from the widget logicGravatar Tomaz Canabrava
This is important to not duplicate code for the Qml view. Now the DownloadFromDiveComputer widget is mostly free from important code (that has been upgraded to the core folder), and I can start coding the QML interface. There are still a few functions on the desktop widget that will die so I can call them via the QML code later. I also touched the location of a few globals (please, let's stop using those) - because it was declared on the desktop code and being used in the core. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27Move model code to modelsGravatar Tomaz Canabrava
This makes it easery to use it on Qml. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27Whitespace and warning fixes for cochran.cGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27Don't use the deprecated CMake variableGravatar Thiago Macieira
The *_VERSION_STRING variable has been deprecated in Qt since 5.1.0. Use the non-deprecated variable instead (which is not a string). Qt 5.9.0 has a bug in the deprecated variable. Since it's deprecated, it's probably not going to be fixed until 5.9.1. See https://bugreports.qt.io/browse/QTBUG-60936 Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27PATCH - Refplace the figures in user manualGravatar Willem Ferguson
Replace the figures in the user manual section that deals with preferences selections. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27Added support for older Cochran models that have configurable sample intervals.Gravatar John Van Ostrand
Corrected problem where dive profiles would include post dive surface interval samples. Added detection for corrupt dives. Signed-off-by: John Van Ostrand <john@vanostrand.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27Fix some warningsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27Android build: remove references to ministro stuffGravatar Jan Mulder
First, Ministro (an app to help installing Qt dependencies on the mobile platform) is not needed in Subsurface context, as all dependencies are part of the distribution. Secondly, it breaks the build as the strings (removed here) are also defined in Qt, and apparently the Gradle build is detecting this double define. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-05-27Android build: Add BUILDTOOLS_REVISIONGravatar Jan Mulder
The used cmake toolkit for building the Android Subsurface-mobile app (qt-android-cmake) recently moved away from compiling with Ant in favor of Gradle. The most recent Android SDK will not support Ant any more. This calls for the addition of the Android SDK BUILDTOOLS_REVISION define to the cmake of Subsurface-mobile. Without this, the build will fail. The value has to be set to an existing directory in .../android-sdk/build-tools/ Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-05-26Adopt O2 and He densities to 20degCGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-05-26Reflect the gas density display in the user manualGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-05-26Gas denisity display improvementGravatar Robert C. Helling
This combines the display with EADD since this is the same value with a different unit. And show it for air dives as well. Suggested by Jan Mulder & Anton Lundin Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-05-26Display gas density instead of SAC in plannerGravatar Robert C. Helling
In the planner, the SAC is prescribed, so there is little use in plotting it (as the color of the cylinder pressure line). Rather use the color to show the density of breathing gas. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-05-26Compute and display gas densityGravatar Robert C. Helling
This appears to be critical for work of breathing so it might be worthwhile to compute. So far only in infobox. For background, see https://www.youtube.com/watch?v=QBajM3xmOtc Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-05-26Creation of dive duration string and surface interval stringGravatar Stefan Fuchs
Update the function to create the dive duration string in a way that it can be used also in info and stats tab and added some more flexibility. Changed layout for <1h freedives to "0:05:35" (w/o units) or "5:35min" (with units and :) or "5min 35sec" (with units with space). Add a new function to create the surface interval string. Completely remove old function get_time_string() and get_time_string_s(). Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-05-26Fix right boundary when moving last handle in plannerGravatar Robert C. Helling
There was a bug in the old code due to confusion between minutes and seconds as the unit of the time axis. But rather than limiting the time for the last handle in terms of the time axis (which potentially includes long deco and allowing that for bottom time quickly leads to dives many many hours long) limit it to 150% of the previous bottom time. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-05-26Adopt planner state caching to new structGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-05-26Assemble global state of planner in a structGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-05-26Move planner notes to separate fileGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-05-20Adapt build.sh if qmake is already in PATH on a MacGravatar Thiago Macieira
Some people (like me) have Qt elsewhere. So long as qmake is in PATH, we should be able to support it. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-12Update Subsurface-mobile versionGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-12Latest translationsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-12Rounding imperial export for profileGravatar Miika Turkia
Precision for the rounding is more than makes sense, but this satisfied the test case. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-05-12Test case for CSV profile export to imperial and backGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-05-09Allow weight system name to be editedGravatar Jan Mulder
Issue #272 lead to the introduction of a new private property of the ComboBoxDelegate class (editable). This new property was not correctly set when creating the weight system delegate. This corrects the (trivial) error, and now allows edit of the weight system name. Fixes: #392 Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-05-07Include some extradata info on Seabear importGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-05-07Merge branch 'seabear-refactor'Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-07Datatrak import rework: Add another memory size ckeckGravatar Salvador Cuñat
As a last minute addition, and for peace of mind and soul, add just another size check, to run before reading values from buffer. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
2017-05-07Datatrak import rework: main functionsGravatar Salvador Cuñat
datatrak_import() is the main function called from parse_file(), but dt_dive_parser() is where the hard work is done, for both, drop file seeking/reading and use memory pointers instead. datatrak_import() now returns 0 on success or 1 on failure and abort import if parser function fails instead of keeping on trying. dt_dive_parser() emits a warning if libdc_model is zero (manual dives). Do not parse profiles if libdc_model is zero, for unknown models we set a fake 0xEE value coverted to Aladin Air X/Z libdc model number. Func now takes a pointer to a buffer and moves along the dive, when done returns a pointer to the actual memory position or NULL if something went wrong. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
2017-05-07Datatrak import rework: modify parsing macrosGravatar Salvador Cuñat
Change how parsing macros work to use memory pointers instead of file descriptors. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
2017-05-07Datatrak import rework: changes on helper funcsGravatar Salvador Cuñat
Remove dtrak_profile() profile parsing func as this work is left to libdivecomputer. Simplifies read_file_header() to return the number of dives in the log file as we don't use the rest of header data. Add dtrak_prepare_data() to achieve a device_data_t structure and get the correct libdc model number for the device. Remove checking macro substituted with JUMP in header file. Add dt_libdc_buffer() to get a buffer parseable with libdivecomputer. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
2017-05-07Datatrak import rework: initial changesGravatar Salvador Cuñat
Remove dtrakheader structure. In the end, we only make use of the number of dives in the log file. Define a models_table_t table which strores the known Uwatec's Aladin models and its equivalence with libdivecomputer known models. Add a macro to check that movements in memblock buffer don't get out of the allocated memory. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
2017-05-07Datatrak import rework: changes of file.c and file.hGravatar Salvador Cuñat
Datatrak import is called from parse_file() in file.c. This function reads the full file to be imported into a memblock structure. It's easier and more secure, to parse this buffer instead of the file itself. These are the necessary changes in function datatrak_import() declaration and call. Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
2017-05-07Update Seabear test data to use proper timesGravatar Miika Turkia
Now that we parse them... Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-05-07Change test case to use new Seabear parsing functionGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-05-07Fix NDL and TTS for Seabear importGravatar Miika Turkia
Apparently the refactoring changed these values to be returned directly in seconds. Not sure why, but luckily we have test cases that discovered the change. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-05-07Remove debug outputGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-05-07Make parsing of Seabear header more robustGravatar Miika Turkia
This should work even if some header line is missing from some DC. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>