From 694dcb17312980a95a35cf85e682dbc00b0ec5eb Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Fri, 11 Jan 2013 08:57:36 +0000 Subject: [PATCH 1/2] Fix pause/unpause bug When you press stop it should clear the paused flag. Fixes #440. --- src/TrainTool.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TrainTool.cpp b/src/TrainTool.cpp index 74c86ef34..8e898b086 100644 --- a/src/TrainTool.cpp +++ b/src/TrainTool.cpp @@ -713,7 +713,7 @@ void TrainTool::Start() // when start button is pressed load_msecs += load_period.restart(); #if defined Q_OS_MAC || defined GC_HAVE_VLC - // enable media tree so we can change movie + // enable media tree so we can change movie - mid workout mediaTree->setEnabled(true); #endif @@ -874,7 +874,7 @@ void TrainTool::Stop(int deviceStatus) // when stop button is pressed if ((status&RT_RUNNING) == 0) return; - status &= ~RT_RUNNING; + status &= ~(RT_RUNNING|RT_PAUSED); // Stop users from selecting different devices // media or workouts whilst a workout is in progress From a959f7c9d4a56809889bfc84a1447f4c5333f165 Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Fri, 11 Jan 2013 09:08:31 +0000 Subject: [PATCH 2/2] Use the device wheelsize!!! Bug reported by many users, should know better than to dismiss it so out of hand. There was a bug. The ANT+ code used an old global setting and not the per device configuration. Fixes #441 --- src/ANT.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ANT.cpp b/src/ANT.cpp index 814c23cc8..59050eccd 100644 --- a/src/ANT.cpp +++ b/src/ANT.cpp @@ -158,7 +158,8 @@ void ANT::setWheelRpm(float x) { // devConf will be NULL if we are are running the add device wizard // we can default to the global setting if (devConf) telemetry.setSpeed(x * (devConf->wheelSize/1000) * 60 / 1000); - else telemetry.setSpeed(x * (appsettings->value(NULL, GC_WHEELSIZE, 2100).toInt()/1000) * 60 / 1000); + //else telemetry.setSpeed(x * (appsettings->value(NULL, GC_WHEELSIZE, 2100).toInt()/1000) * 60 / 1000); + else telemetry.setSpeed((x * devConf->wheelSize / 1000) * 60 / 1000); // not a global setting anymore -- device specific } /*======================================================================