diff options
author | Joseph W. Joshua <joejoshw@gmail.com> | 2014-06-13 17:10:10 +0300 |
---|---|---|
committer | Thiago Macieira <thiago@macieira.org> | 2014-08-13 10:48:14 -0700 |
commit | 5292bcbf2134901e3120fb15e2f85626b2ceb1ad (patch) | |
tree | 56133dd516573623c9c9a0face17bf1db63eb968 /qt-ui/configuredivecomputerthreads.cpp | |
parent | 8ccf2e8f1d05fb34854ce5f5de935d523484e163 (diff) | |
download | subsurface-5292bcbf2134901e3120fb15e2f85626b2ceb1ad.tar.gz |
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>
Diffstat (limited to 'qt-ui/configuredivecomputerthreads.cpp')
-rw-r--r-- | qt-ui/configuredivecomputerthreads.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/qt-ui/configuredivecomputerthreads.cpp b/qt-ui/configuredivecomputerthreads.cpp index 369640459..f0e2bde6e 100644 --- a/qt-ui/configuredivecomputerthreads.cpp +++ b/qt-ui/configuredivecomputerthreads.cpp @@ -34,6 +34,14 @@ void ReadSettingsThread::run() //Read general settings unsigned char uData[1] = {0}; + //DiveMode + rc = hw_ostc3_device_config_read(m_data->device, 0x20, uData, sizeof(uData)); + if (rc == DC_STATUS_SUCCESS) + m_deviceDetails->setDiveMode(uData[0]); + //Saturation + rc = hw_ostc3_device_config_read(m_data->device, 0x2A, uData, sizeof(uData)); + if (rc == DC_STATUS_SUCCESS) + m_deviceDetails->setSaturation(uData[0]); //LastDeco rc = hw_ostc3_device_config_read(m_data->device, 0x2D, uData, sizeof(uData)); if (rc == DC_STATUS_SUCCESS) @@ -122,6 +130,14 @@ void WriteSettingsThread::run() hw_ostc3_device_customtext(m_data->device, m_deviceDetails->customText().toUtf8().data()); unsigned char data[1] = {0}; + //dive mode + data[0] = m_deviceDetails->diveMode(); + hw_ostc3_device_config_write(m_data->device, 0x20, data, sizeof(data)); + + //saturation + data[0] = m_deviceDetails->saturation(); + hw_ostc3_device_config_write(m_data->device, 0x2A, data, sizeof(data)); + //last deco data[0] = m_deviceDetails->lastDeco(); hw_ostc3_device_config_write(m_data->device, 0x2C, data, sizeof(data)); |