diff options
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)); |