summaryrefslogtreecommitdiff
path: root/daemon/sensorPlugins/stepCounter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'daemon/sensorPlugins/stepCounter.cpp')
-rw-r--r--daemon/sensorPlugins/stepCounter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon/sensorPlugins/stepCounter.cpp b/daemon/sensorPlugins/stepCounter.cpp
index fe8370c..35618f2 100644
--- a/daemon/sensorPlugins/stepCounter.cpp
+++ b/daemon/sensorPlugins/stepCounter.cpp
@@ -41,7 +41,7 @@ StepCounterPlugin::StepCounterPlugin(QObject *parent, int initInterval) :
if (stepcounterSensor->reading()->steps() == 0) {
stepsOffset = -(lastLineData[1].toInt());
} else {
-
+ stepsOffset = - stepcounterSensor->reading()->steps() + (lastLineData[1].toInt());
}
} else {
//if it's a new day, we 'reset' the counter. this is crude - we should really check for a boot here, since certain machines have capability of counting steps when powered down.