aboutsummaryrefslogtreecommitdiffstats
path: root/configuredivecomputerthreads.cpp
AgeCommit message (Collapse)Author
2014-10-27Write config data to the OSTCGravatar Anton Lundin
This adds code that writes configuration data to the OSTC. As we don't look at all the values in the OSTC config blocks, we read the current blocks and only change the values we can change. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27Debug code for OSTC CFGravatar Anton Lundin
This code is to debug the rest of the existing CF's, so we can look at the rest of the values. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27Decode CF configuration data from OSTCGravatar Anton Lundin
This adds code to decode the custom functions data. We only decode the relevant CF's. The relevant ones are chosen by which ones have corresponding settings in the OSTC3. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27Decode configuration data from OSTCGravatar Anton Lundin
This adds code to decode the configuration blocks from the OSTC. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27Debug code to simulate read/write to OSTC memoryGravatar Anton Lundin
This adds debug code to simulate the read and write to OSTC memory dumps. The OSTC configuration happens via writing whole 512 byte blocks to the memory and this code is useful when debugging that process Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-27Cleanup syntax and styling in Configure DCGravatar Anton Lundin
This cleans up some styling and syntax in the Configure Dive Computer code path. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-21Check return value after firmware updatesGravatar Anton Lundin
This reports back a error to the user if the firmware update failed. We should re-wire this to have a log-function that gets called from libdivecomputer via the context to get an actual error message. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-21Fix compability with libdivecomputer < 0.5.0Gravatar Anton Lundin
hw_ostc_device_fwupdate was introduced after 0.4.2 so ifdef it to libdivecomputer >= 0.5.0. The scope of users interested in this feature probably isn't big enough to justify a bump of our dependencies to a unreleased version of libdivecomputer. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-20Configure support for OSTC, Mk.2/2N/2CGravatar Anton Lundin
First out is firmware updates. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-20Style cleanupGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Correct OSTC3 read/write of pressure sensor offsetGravatar Anton Lundin
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-18Add support to reset OSTC3 settings to defaultGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Read/Write more settings from the OSTC3Gravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Simplify some OSTC3 Code with macrosGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Define settings ids for the new OSTC3 settingsGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Fix 02 typo, rename O2 members in devicesettingsGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-18Add missing compass gain read from the OSTC3Gravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-16Add a missing break after OSTC3 settings writeGravatar Anton Lundin
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-16Set the diluent values from the right bufferGravatar Anton Lundin
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-15Read and write desaturation from OSTC3'sGravatar Anton Lundin
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-14Check that the model is a supported oneGravatar Anton Lundin
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-12This adds read/write of Suunto Vyper configsGravatar Anton Lundin
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-12Remove double-assignment to rc varableGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-10Store the setpoint values read from OSTC3Gravatar Anton Lundin
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-02Don't use switch with just one caseGravatar Dirk Hohndel
This should be an if statement. Gets rid of build warning. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-17Change presentation of OSTC 3 firmware versionGravatar Joseph W. Joshua
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-17Ensure Subsurface still compiles with libdivecomputer 0.4.xGravatar Thiago Macieira
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-13Use macros for OSTC 3 setting codesGravatar Joseph W. Joshua
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-13Start Work on Firmware UpdateGravatar Joseph W. Joshua
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-13Add read/write support for OSTC 3 SetPoint settingsGravatar Joseph W. Joshua
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-13Add reading and writing of OSTC 3 Dil valuesGravatar Joseph W. Joshua
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-13Implement saving of OSTC3 Gas SettingsGravatar Joseph W. Joshua
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-13Read OSTC3 GasSetting ValuesGravatar Joseph W. Joshua
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-13Move non gui code from qt-uiGravatar Joseph W. Joshua
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>