summaryrefslogtreecommitdiffstats
path: root/examples/sensors/maze
diff options
context:
space:
mode:
authorWolfgang Beck <wolfgang.beck@nokia.com>2011-10-04 10:24:42 +1000
committerLincoln Ramsay <lincoln.ramsay@nokia.com>2011-10-10 09:25:31 +1000
commit8292bb2ccefa91aa50eff52d8237ddd3cef15bb5 (patch)
tree7f62fc1c0be1e47a8dc631dda0f69e9c4511deaf /examples/sensors/maze
parentc25e4e542fd846facb1ca250d44829c0121abdd2 (diff)
MTMW-345-346 CR change for TiltSensor
Change-Id: I735e0a6ab3aaad4290216c8501e8be684f7d0e6b Reviewed-on: http://codereview.qt-project.org/5938 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Wolfgang Beck <wolfgang.beck@nokia.com>
Diffstat (limited to 'examples/sensors/maze')
-rw-r--r--examples/sensors/maze/Maze.qml11
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/sensors/maze/Maze.qml b/examples/sensors/maze/Maze.qml
index b529f089..9a79e0f7 100644
--- a/examples/sensors/maze/Maze.qml
+++ b/examples/sensors/maze/Maze.qml
@@ -155,14 +155,15 @@ Rectangle {
//Start the Tilt reader timer
tiltTimer.running = true;
+ tiltSensor.calibrate();
}
}
TiltSensor{
id: tiltSensor
- radian: false
- measureFrom: TiltSensor.FaceUp
- running: true
+ unit: TiltSensor.Degrees
+ enabled: true
+ accuracy: 5.0
}
//Timer to read out the x and y rotation of the TiltSensor
@@ -170,8 +171,8 @@ Rectangle {
id: tiltTimer
interval: 50; running: false; repeat: true
onTriggered: {
- if (!tiltSensor.running)
- tiltSensor.running = true;
+ if (!tiltSensor.enabled)
+ tiltSensor.enabled = true;
if (mouseCtrl === null)
return;