From 1dfa6732e026c69472c821d83346cc66bcf3e476 Mon Sep 17 00:00:00 2001 From: Thomas McGuire Date: Thu, 19 Jul 2012 13:22:16 +0200 Subject: 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 Reviewed-by: Adam Parco Reviewed-by: Lorn Potter --- src/plugins/sensors/blackberry/bbutil.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/plugins/sensors/blackberry/bbutil.h') 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 +#include + +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 -- cgit v1.2.3