Commit graph

5805 commits

Author SHA1 Message Date
Thiago Macieira
1b866e67f3 Ensure Subsurface still compiles with libdivecomputer 0.4.x
The OSTC3 functions we need were introduced in 0.5.0 (more specifically,
in commit 56e2dec7266e71e725604a4a8bff5e61f3d62259).

Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-17 10:06:06 -07:00
Joseph W. Joshua
4e99382c96 Improve on error reporting in the ConfigureDiveComputer class
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>
2014-08-13 10:48:15 -07:00
Joseph W. Joshua
24cb0b0496 Hide status message when an error message is present
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>
2014-08-13 10:48:15 -07:00
Joseph W. Joshua
4cc60ea940 Use QXmlStreamReader for xml restore
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>
2014-08-13 10:48:15 -07:00
Joseph W. Joshua
a9b55d7f0d Change Dive Computer Configuration dialog
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>
2014-08-13 10:48:15 -07:00
Joseph W. Joshua
91ccd89048 Use QXmlStreamReader for dive computer settings backup
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>
2014-08-13 10:48:15 -07:00
Joseph W. Joshua
8e8d226f57 Use macros for OSTC 3 setting codes
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>
2014-08-13 10:48:15 -07:00
Joseph W. Joshua
cc6c385f33 Start Work on Firmware Update
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>
2014-08-13 10:48:15 -07:00
Joseph W. Joshua
8aa7fddb22 Add read/write support for OSTC 3 SetPoint settings
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>
2014-08-13 10:48:15 -07:00
Joseph W. Joshua
9c032f20c0 Add reading and writing of OSTC 3 Dil values
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>
2014-08-13 10:48:14 -07:00
Joseph W. Joshua
65b0b8a64b Backup/Restore of OSTC3 Gas Settings
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>
2014-08-13 10:48:14 -07:00
Joseph W. Joshua
a52beebbe9 Implement saving of OSTC3 Gas Settings
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>
2014-08-13 10:48:14 -07:00
Joseph W. Joshua
8b39d2fc17 Read OSTC3 GasSetting Values
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>
2014-08-13 10:48:14 -07:00
Joseph W. Joshua
4f37602836 Move non gui code from qt-ui
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>
2014-08-13 10:48:14 -07:00
Joseph W. Joshua
045a6fb6b1 Start working on GAS and DIL tables
Start work for gas1-5 and dil1-5.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-13 10:48:14 -07:00
Joseph W. Joshua
d76881cb01 THIS COMMIT NEEDS A COMMIT MESSAGE
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>
2014-08-13 10:48:14 -07:00
Joseph W. Joshua
5292bcbf21 Add more OSTC 3 settings
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>
2014-08-13 10:48:14 -07:00
Joseph W. Joshua
8ccf2e8f1d Change ConfigureDiveComputerDialog to use tabbed interface
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>
2014-08-13 10:48:14 -07:00
Joseph W. Joshua
09ec8a44e5 Add Support for more OSTC 3 Settings
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>
2014-08-13 10:48:14 -07:00
Joseph W. Joshua
aad60ef6da Working XML Backup and Restore
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>
2014-08-13 10:48:14 -07:00
Joseph W. Joshua
e54d7d9178 Backup basic settings as XML
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>
2014-08-13 10:48:14 -07:00
Joseph W. Joshua
3534e29ae2 Port writing of date and time to new classes
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>
2014-08-13 10:48:14 -07:00
Joseph W. Joshua
20eb62a98a Polish up on classes
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>
2014-08-13 10:48:11 -07:00
Joseph W. Joshua
4fc16b1674 Move divecomputer configuration code to different files
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>
2014-08-09 12:06:42 -03:00
Joseph W. Joshua
2432350064 Add brightness setting
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>
2014-08-09 12:01:56 -03:00
Joseph W. Joshua
a7a74ae9a6 Improve writing of device name to dive computers.
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>
2014-08-09 12:01:56 -03:00
Joseph W. Joshua
ee2403d63c Improve writing of date and time to dive computer
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>
2014-08-09 12:01:56 -03:00
Joseph W. Joshua
a08d239af5 Change dive computer family detection
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>
2014-08-09 12:01:56 -03:00
Joseph W. Joshua
3e127a059f Create class to write settings to dive computer
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>
2014-08-09 12:01:56 -03:00
Joseph W. Joshua
a7c9b25b05 Read basic details from dive computer
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>
2014-08-09 12:01:54 -03:00
Joseph W. Joshua
791fbee260 Load vendor list and product list
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>
2014-08-09 11:59:15 -03:00
Joseph W. Joshua
ec02737eda Create Dive Computer configuration dialog
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>
2014-08-09 11:50:14 -03:00
Dirk Hohndel
af1d77056e Change version to 4.2
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-08 11:39:19 -07:00
Dirk Hohndel
a64dfab6e6 Add latest html files for user manual
These are used when building from source without asciidoc installed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-08 11:37:09 -07:00
Dirk Hohndel
35c0e4d483 Pull latest translations from Transifex
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-08 11:31:57 -07:00
Salvador Cuñat
1baa248a9e Update spanish translation of user manual to english c1026f5
And fixes a little typo.

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-08 11:17:28 -07:00
Dirk Hohndel
827d4740c3 Better User Agent for Subsurface
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>
2014-08-08 11:13:05 -07:00
Dirk Hohndel
a9f59c0cb3 Revert "Don't translate components of the version"
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>
2014-08-08 10:44:06 -07:00
Dirk Hohndel
4a125384ac Fix possible crash attempting network connection
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>
2014-08-08 10:39:46 -07:00
Dirk Hohndel
6fdbf2069d Don't translate components of the version
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>
2014-08-08 00:31:18 -07:00
Willem Ferguson
9170fbc383 User manual: Delete images using dustbin icon
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>
2014-08-07 23:54:22 -07:00
Miika Turkia
d06292be7f Improve wording on ReleaseNotes
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07 22:05:41 -07:00
Miika Turkia
5f87aba037 Improve wording on README
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07 22:05:04 -07:00
Dirk Hohndel
a22544f49a Include SupportedDivecomputers.txt with the bundled docs
After all, it's referenced in the ReleaseNotes.txt and the README

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07 13:55:22 -07:00
Dirk Hohndel
7129115999 Improve generation of list of supported dive computers
Get it straight from the libdivecomputer sources used...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07 13:53:09 -07:00
Dirk Hohndel
5ea2c6c237 Update ReleaseNotes and README for the upcoming release of 4.2
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07 13:16:46 -07:00
Tomaz Canabrava
efa069d93b Paint the middle of the trashbin white.
Fixes #697

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07 13:14:49 -07:00
Tomaz Canabrava
44f59b6022 Move the Trash bin to the topRight on the pictures
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>
2014-08-07 13:12:32 -07:00
Sergey Starosek
fddad4e414 Update russian translation of the user manual
Aligned with english version c1026f5975

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07 11:22:48 -07:00
Salvador Cuñat
1f585f3e7c Update spanish translation of user manual to english 150783f
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-07 11:22:40 -07:00