diff options
author | Anton Lundin <glance@acc.umu.se> | 2014-10-15 08:27:26 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-10-15 14:51:03 +0200 |
commit | 0c4f027386ad8932156f24302d956361c28dba85 (patch) | |
tree | 98d8571ce430ffb766e35f372436ddc02a84fc90 /configuredivecomputerthreads.cpp | |
parent | 51a112c8bfa8e3d7eb78abeb516261f342c8aced (diff) | |
download | subsurface-0c4f027386ad8932156f24302d956361c28dba85.tar.gz |
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>
Diffstat (limited to 'configuredivecomputerthreads.cpp')
-rw-r--r-- | configuredivecomputerthreads.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/configuredivecomputerthreads.cpp b/configuredivecomputerthreads.cpp index 902f0c90f..c0857d3f7 100644 --- a/configuredivecomputerthreads.cpp +++ b/configuredivecomputerthreads.cpp @@ -392,6 +392,10 @@ void ReadSettingsThread::run() rc = hw_ostc3_device_config_read(m_data->device, OSTC3_SATURATION, uData, sizeof(uData)); if (rc == DC_STATUS_SUCCESS) m_deviceDetails->setSaturation(uData[0]); + //Desaturation + rc = hw_ostc3_device_config_read(m_data->device, OSTC3_DESATURATION, uData, sizeof(uData)); + if (rc == DC_STATUS_SUCCESS) + m_deviceDetails->setDesaturation(uData[0]); //LastDeco rc = hw_ostc3_device_config_read(m_data->device, OSTC3_LAST_DECO, uData, sizeof(uData)); if (rc == DC_STATUS_SUCCESS) @@ -628,6 +632,10 @@ void WriteSettingsThread::run() data[0] = m_deviceDetails->saturation(); hw_ostc3_device_config_write(m_data->device, OSTC3_SATURATION, data, sizeof(data)); + //desaturation + data[0] = m_deviceDetails->desaturation(); + hw_ostc3_device_config_write(m_data->device, OSTC3_DESATURATION, data, sizeof(data)); + //last deco data[0] = m_deviceDetails->lastDeco(); hw_ostc3_device_config_write(m_data->device, OSTC3_LAST_DECO, data, sizeof(data)); |