summaryrefslogtreecommitdiffstats
path: root/configuredivecomputerthreads.cpp
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2015-09-25 00:59:04 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-25 09:56:43 -0700
commitf5176d908d5fbbf6af2696b56b3e9005165c91e0 (patch)
tree991c1b4c7761ff6c5d014c970bff6882734e2d32 /configuredivecomputerthreads.cpp
parent8946c822425d22fb111a96bccbd3d81dd0447f5c (diff)
downloadsubsurface-f5176d908d5fbbf6af2696b56b3e9005165c91e0.tar.gz
Skip OSTC3 configs which the sport doesn't handle
Use model name to skip some configs which the Sport doesn't handle and starts misbehaving on. 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.cpp28
1 files changed, 22 insertions, 6 deletions
diff --git a/configuredivecomputerthreads.cpp b/configuredivecomputerthreads.cpp
index 00ab07f53..ae8305585 100644
--- a/configuredivecomputerthreads.cpp
+++ b/configuredivecomputerthreads.cpp
@@ -648,9 +648,17 @@ static dc_status_t read_ostc3_settings(dc_device_t *device, DeviceDetails *m_dev
READ_SETTING(OSTC3_BOTTOM_GAS_CONSUMPTION, bottomGasConsumption);
READ_SETTING(OSTC3_DECO_GAS_CONSUMPTION, decoGasConsumption);
READ_SETTING(OSTC3_MOD_WARNING, modWarning);
- READ_SETTING(OSTC3_DYNAMIC_ASCEND_RATE, dynamicAscendRate);
- READ_SETTING(OSTC3_GRAPHICAL_SPEED_INDICATOR, graphicalSpeedIndicator);
- READ_SETTING(OSTC3_ALWAYS_SHOW_PPO2, alwaysShowppO2);
+
+ //Skip things not supported on the sport, if its a sport.
+ if (m_deviceDetails->model == "Sport") {
+ EMIT_PROGRESS();
+ EMIT_PROGRESS();
+ EMIT_PROGRESS();
+ } else {
+ READ_SETTING(OSTC3_DYNAMIC_ASCEND_RATE, dynamicAscendRate);
+ READ_SETTING(OSTC3_GRAPHICAL_SPEED_INDICATOR, graphicalSpeedIndicator);
+ READ_SETTING(OSTC3_ALWAYS_SHOW_PPO2, alwaysShowppO2);
+ }
#undef READ_SETTING
@@ -904,9 +912,17 @@ static dc_status_t write_ostc3_settings(dc_device_t *device, DeviceDetails *m_de
WRITE_SETTING(OSTC3_BOTTOM_GAS_CONSUMPTION, bottomGasConsumption);
WRITE_SETTING(OSTC3_DECO_GAS_CONSUMPTION, decoGasConsumption);
WRITE_SETTING(OSTC3_MOD_WARNING, modWarning);
- WRITE_SETTING(OSTC3_DYNAMIC_ASCEND_RATE, dynamicAscendRate);
- WRITE_SETTING(OSTC3_GRAPHICAL_SPEED_INDICATOR, graphicalSpeedIndicator);
- WRITE_SETTING(OSTC3_ALWAYS_SHOW_PPO2, alwaysShowppO2);
+
+ //Skip things not supported on the sport, if its a sport.
+ if (m_deviceDetails->model == "Sport") {
+ EMIT_PROGRESS();
+ EMIT_PROGRESS();
+ EMIT_PROGRESS();
+ } else {
+ WRITE_SETTING(OSTC3_DYNAMIC_ASCEND_RATE, dynamicAscendRate);
+ WRITE_SETTING(OSTC3_GRAPHICAL_SPEED_INDICATOR, graphicalSpeedIndicator);
+ WRITE_SETTING(OSTC3_ALWAYS_SHOW_PPO2, alwaysShowppO2);
+ }
#undef WRITE_SETTING