diff options
author | Thomas McGuire <thomas.mcguire.qnx@kdab.com> | 2012-07-19 13:22:16 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-07-23 00:19:24 +0200 |
commit | 1dfa6732e026c69472c821d83346cc66bcf3e476 (patch) | |
tree | 2a50d0c9643bedae073a4d8477cdc4af7260e49f /src/plugins/sensors/blackberry/bbutil.h | |
parent | 505dbc8230414a31cd3def9f2d8b144b0e9444f4 (diff) |
Blackberry: Use the rotation matrix as the compass source
This fixes the direction flipping over when holding the device
upside-down.
Change-Id: I57bac63208d475d4091b47593b9768613eea30b0
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Adam Parco <aparco@rim.com>
Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
Diffstat (limited to 'src/plugins/sensors/blackberry/bbutil.h')
-rw-r--r-- | src/plugins/sensors/blackberry/bbutil.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/plugins/sensors/blackberry/bbutil.h b/src/plugins/sensors/blackberry/bbutil.h index f360776f..86882400 100644 --- a/src/plugins/sensors/blackberry/bbutil.h +++ b/src/plugins/sensors/blackberry/bbutil.h @@ -41,14 +41,14 @@ #ifndef BBUTIL_H #define BBUTIL_H -#include <QtCore/qmath.h> +#include <QtCore/qglobal.h> + +namespace BbUtil { + +void matrixToEulerZXY(const float matrix[3*3], float &thetaX, float &thetaY, float& thetaZ); + +qreal radiansToDegrees(qreal radians); -namespace { -qreal radiansToDegrees(qreal radians) -{ - static const qreal radToDeg = 180.0f / M_PI; - return radians * radToDeg; -} } #endif |