Commit graph

25 commits

Author SHA1 Message Date
Anton Lundin
8439e72bb1 Style cleanup
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-20 18:12:04 -07:00
Anton Lundin
839bcaaf70 Correct OSTC3 read/write of pressure sensor offset
The OSTC3 stores the pressure sensor offset as a signed 8-bit integer.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18 15:36:28 -07:00
Anton Lundin
74f27a0a39 Add support to reset OSTC3 settings to default
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18 15:22:22 -07:00
Anton Lundin
d266fce08e Read/Write more settings from the OSTC3
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18 15:22:05 -07:00
Anton Lundin
b2a9de7cb4 Simplify some OSTC3 Code with macros
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18 15:21:57 -07:00
Anton Lundin
c06a7d6e6d Define settings ids for the new OSTC3 settings
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18 15:21:23 -07:00
Anton Lundin
624f0e9b24 Fix 02 typo, rename O2 members in devicesettings
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18 15:20:20 -07:00
Anton Lundin
9e958c80fa Add missing compass gain read from the OSTC3
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18 15:19:58 -07:00
Anton Lundin
556474e4dd Add a missing break after OSTC3 settings write
There was a missing break after writing the settings to the OSTC3. It
caused us to fall down into the default case and saying that the
operation was unsupported.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-16 11:10:18 +02:00
Anton Lundin
d025d5bbb6 Set the diluent values from the right buffer
The OSTC3 settings code read the data from the computer into spData, but
set the data into the devicedetails object from dilData.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-16 11:09:38 +02:00
Anton Lundin
0c4f027386 Read and write desaturation from OSTC3's
This adds missing code to read and write the desaturation factor to and
from OSTC3's.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-15 14:51:03 +02:00
Anton Lundin
d7cae093be Check that the model is a supported one
This code adds some crude checks to verify that the device is a
supported one before we actually read/write from it. This is to
white/black-list devices so we don't write or read memory that we don't
know anything about.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-14 20:26:32 +02:00
Anton Lundin
daa5c14cbf This adds read/write of Suunto Vyper configs
This implements the reading and writing of the configuration varables
from the Suunto Vyper family devices.

Everything here is implemented based on the excellent information on:
http://www.sarnau.info/papers:suunto_vyper

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-12 12:31:53 -04:00
Anton Lundin
60d0b622a9 Remove double-assignment to rc varable
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-12 12:30:25 -04:00
Anton Lundin
f353ef023f Store the setpoint values read from OSTC3
The setpoint values was never stored in the deviceinfo object.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-10 02:43:34 -04:00
Dirk Hohndel
f61ee20ba3 Don't use switch with just one case
This should be an if statement.

Gets rid of build warning.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-02 07:35:58 -07:00
Joseph W. Joshua
7264ec2fa8 Change presentation of OSTC 3 firmware version
This change changes the way we present the OSTC 3 firmware version to a
correct value, showing the major and minor version number.

Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2014-08-17 14:11:29 -07:00
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
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
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
Renamed from qt-ui/configuredivecomputerthreads.cpp (Browse further)