projects
/
ghostsoverboard
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'vibrationforharmattan' into harmattan
[ghostsoverboard]
/
orientationcontrolledgraphicspixmapobject.cpp
diff --git
a/orientationcontrolledgraphicspixmapobject.cpp
b/orientationcontrolledgraphicspixmapobject.cpp
index
d86ea23
..
272c7cf
100644
(file)
--- a/
orientationcontrolledgraphicspixmapobject.cpp
+++ b/
orientationcontrolledgraphicspixmapobject.cpp
@@
-65,17
+65,25
@@
void OrientationControlledGraphicsPixmapObject::readRotationSensor()
QRotationReading* pSensorData = rotationSensor_.reading();
QRotationReading* pSensorData = rotationSensor_.reading();
- int deltay = pSensorData->x(); //yes, you need the "x" value from the sensor for "y" direction in the scene...
- int deltax = pSensorData->y(); //...and vice versa
+ // int deltay = pSensorData->x(); //yes, in Maemo 5 you need the "x" value from the sensor for "y" direction in the scene...
+ // int deltax = pSensorData->y(); //...and vice versa
+ int deltay = -pSensorData->y(); //But in Harmattan, you need the "y" value from the sensor for "y" direction in the scene...
+ int deltax = pSensorData->x(); //...and x for x (when in landscape)
+ //and you need to reverse the y value
// qDebug() << deltax << " " << deltay;
int oldx = x();
int oldy = y();
// qDebug() << deltax << " " << deltay;
int oldx = x();
int oldy = y();
- int newx = x() + deltax/15;
- int newy = y() + deltay/15;
+ //this is how it works on maemo
+// int newx = x() + deltax/15;
+// int newy = y() + deltay/15;
+
+ //this is for Harmattan
+ int newx = x() + deltax/5;
+ int newy = y() + deltay/5;
// qDebug() << sceneRectangle.left() << sceneRectangle.right();
// qDebug() << sceneRectangle.left() << sceneRectangle.right();