summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLincoln Ramsay <lincoln.ramsay@nokia.com>2011-03-15 15:15:45 +1000
committerLincoln Ramsay <lincoln.ramsay@nokia.com>2011-03-18 15:29:59 +1000
commit4a0cd544fae88d3d8f08e296a4072bdada9ced8c (patch)
treefd136798ea344ced31c6d46dce26b0ffb0115d59
parentc30ddc2c7128ffc3c0d55569540d8139e5c3713d (diff)
Don't ignore the initial reading (grue plugin)
-rw-r--r--examples/sensors/grueplugin/gruesensorimpl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/sensors/grueplugin/gruesensorimpl.cpp b/examples/sensors/grueplugin/gruesensorimpl.cpp
index 7318a9afd0..4a277c91d1 100644
--- a/examples/sensors/grueplugin/gruesensorimpl.cpp
+++ b/examples/sensors/grueplugin/gruesensorimpl.cpp
@@ -109,7 +109,7 @@ void gruesensorimpl::lightChanged()
}
// Only send an update if the value has changed.
- if (chance != m_reading.chanceOfBeingEaten()) {
+ if (chance != m_reading.chanceOfBeingEaten() || m_reading.timestamp() == 0) {
m_reading.setTimestamp(timer.elapsed());
m_reading.setChanceOfBeingEaten(chance);