The OSTC3 functions we need were introduced in 0.5.0 (more specifically,
in commit 56e2dec7266e71e725604a4a8bff5e61f3d62259).
Signed-off-by: Thiago Macieira <thiago@macieira.org>
This patch improves on the error reporting for the dive computer
configuration dialog to use config->lastError.
The previous code was using a different argument in each function,
which lacked uniformity.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
To avoid confusion, this code update makes the status text empty whenever
there is an error message. This makes the error message more prominent.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
This patch changes reading of OSTC 3 settings backup xml from
libxml to QXmlStreamReader to match the use of QXmlStreamWriter
in the xml saving.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Changes the layout of the ConfigureDiveComputer dialog to use a
list of supported computers on the left, with a stacked widget
showing the configurable details.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
This patch changes the code in the ConfigureDiveComputer class to
use QXmlStreamWriter instead of an hardcoded xml structure.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Changes the classes in configuredivecomputerthreads.cpp to use
macros to hold the setting hex codes.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
This patch implements the first step towards OSTC 3 firmware update.
Its not much, just file selection, but I will build up on it from there.
Implements a thread to initiate firmware updates. Currently, this is
for the OSTC 3.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Implements support for reading, writing and backup/restore of set point
settings for the OSTC 3.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Implements reading, writing and backup/restore of OSTC 3 Dil Values
(setting 0x15 to 0x19)
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Implements backup and restore for OSTC3 Gas Settings.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Implements writing OSTC3 gas settings to the device.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Implements the reading of OSTC3 Gas Settings. These are settings
0x10 to 0x14
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Moves non gui classes (configuredivecomputer, configuredivecomputerthreads
and devicedetails) from qt-ui to the top level folder.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
I've moved the .pro file fixes to where it happened, so the rest of the
changes need explanation now. -Thiago
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
I am adding more OSTC 3 settings as I go along. Here, I have
added dive mode and saturation.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Changes the dive computer configuration dialog to use a
tabbed interface. This will make it easier to add new
dive computer models to the interface.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Adds support for more OSTC 3 Settings to the reading, writing,
backup and restore functions. These settings are: last deco,
units, sampling rate, salinity, dive mode colour and compass
gain.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
The ConfigureDiveComputer class now has functions for complete
XML backup and restore. These dump the loaded settings on a
dive computer to an XML file, and there is an option to
restore them.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
This patch enables XML backup. We can now save the settings
to an XML file. Currently this backs up just the basic stuff
such as custom text, language and brightness.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
After splitting dive computer configuration classes, the date/time
setting had not been ported. This adds the same to the classes.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
This patch polishes up on all classes added for dive computer
configuration to give a clean workflow. The classes can now
write and read data from the OSTC 3.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
This splits the code in configuredivecomputer.cpp into multiple files.
The read and write threads are moved to configuredivecomputerthreads.h/cpp,
and the device details class is moved to devicedetails.h/.cpp
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Adds a setting to control the device's brightness. Currently I
have only the OSTC 3. Will add more afterwards.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Improves the writing of device name to the dive computer. The
code has been updated to use a switch statement.
This will make it easier to add new devices in the future.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Improves writing of date and time to the dive computer. This
has been tested using the Heinrichs Weikamp OSTC-3.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Following suggestions on the mailing list, this changes the
method used to detect the dive computer family. Detection is
now done using: dc_device_get_type.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Adds a class to write settings to dive computer, and modifies
the existing ones to integrate it.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Added classes for reading data from dive computer. This is
at the basic level and I will expand it as I go along.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Using code from 'downloadfromdivecomputer' class, this code
loads the vendors and products to the respective comboboxes.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Create a dialog for reading and writing settings to and
from dive computers, with a menu entry in MainWindow to
open the dialog.
I will build up on this dialog and change it as needed.
Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
This one is less verbose and very easy to parse. It's guaranteed to have
five components, separated by ':' with no other ':' in the string:
Subsurface:<version>:<PrettyOSName>:<appCpuArch[/osCpuArch]>:<UILang>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This reverts commit 6fdbf2069d.
That was actually the wrong thing to do, now that I think about it.
Instead we should show the translated version on screen and send a
compact, easy to parse variation of this as the User-Agent header.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If we didn't get back a JSON encoded string (i.e., if the response
contained no '"') we would access a QList past its boundary.
I'm somewhat hopeful that this is a last second fix for an annoying bug
I've been trying to figure out for a while.
See #514
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When transmitting the Subsurface version string we always want to use the
English terms, not the localized terms.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Madification in text to reflect change in UI after the dustbin icon
has been moved in thumbnails of photos.
Two images in the manual were replaced.
Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
It was too easy to remove a picture by mistake, not anymore.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>