diff options
author | Joseph W. Joshua <joejoshw@gmail.com> | 2014-06-20 07:51:32 +0300 |
---|---|---|
committer | Thiago Macieira <thiago@macieira.org> | 2014-08-13 10:48:14 -0700 |
commit | 045a6fb6b16ae402588484fb8361f15f8978bdd3 (patch) | |
tree | ba90b922cada55cfebd727c11e0cf9b862aa07f7 /qt-ui/configuredivecomputerthreads.cpp | |
parent | d76881cb012903a1855e53b796571e1c5e849c1a (diff) | |
download | subsurface-045a6fb6b16ae402588484fb8361f15f8978bdd3.tar.gz |
Start working on GAS and DIL tables
Start work for gas1-5 and dil1-5.
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 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/qt-ui/configuredivecomputerthreads.cpp b/qt-ui/configuredivecomputerthreads.cpp index f0e2bde6e..3afb11bc5 100644 --- a/qt-ui/configuredivecomputerthreads.cpp +++ b/qt-ui/configuredivecomputerthreads.cpp @@ -32,6 +32,31 @@ void ReadSettingsThread::run() m_deviceDetails->setSamplingRate(0); m_deviceDetails->setUnits(0); + + //Gread gas mixes + gas gas1; + gas gas2; + gas gas3; + gas gas4; + gas gas5; + //Gas 1 + unsigned char gasData[4] = {0,0,0,0}; + rc = hw_ostc3_device_config_read(m_data->device, 0x10, gasData, sizeof(gasData)); + if (rc == DC_STATUS_SUCCESS) { + //Gas 1 read successful + gas gas1; + gas1.depth = gasData[3]; + gas1.oxygen = gasData[0]; + gas1.helium = gasData[1]; + gas1.type = gasData[2]; + } + + m_deviceDetails->setGas1(gas1); + m_deviceDetails->setGas2(gas2); + m_deviceDetails->setGas3(gas3); + m_deviceDetails->setGas4(gas4); + m_deviceDetails->setGas5(gas5); + //Read general settings unsigned char uData[1] = {0}; //DiveMode |