diff options
author | Richard Moe Gustavsen <richard.gustavsen@digia.com> | 2013-06-10 12:33:08 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-06-10 13:28:38 +0200 |
commit | b01f928735a768fe676df60523be1fd718d45593 (patch) | |
tree | 1b9f6014281eecb92b46db6be149d9a97661ab84 /src/plugins/sensors/ios/iosgyroscope.h | |
parent | d487c74a7f6a18a106314d3dc58013c6cfc2e1ca (diff) |
iOS: change gyro implementation to use Timer base polling
Ref change: 102bdf3
We need to change the implementation to use polling rather
than callback to achieve full performance together with
fine-grained QTimers.
Change-Id: I895418996b53432642d37279855167d815261d92
Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
Diffstat (limited to 'src/plugins/sensors/ios/iosgyroscope.h')
-rw-r--r-- | src/plugins/sensors/ios/iosgyroscope.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/sensors/ios/iosgyroscope.h b/src/plugins/sensors/ios/iosgyroscope.h index ed46241c..4f4c399a 100644 --- a/src/plugins/sensors/ios/iosgyroscope.h +++ b/src/plugins/sensors/ios/iosgyroscope.h @@ -42,7 +42,7 @@ #ifndef IOSGYROSCOPE_H #define IOSGYROSCOPE_H -#include <Foundation/Foundation.h> +#include <CoreMotion/CMMotionManager.h> #include <qsensorbackend.h> #include <qgyroscope.h> @@ -55,14 +55,15 @@ public: static char const * const id; explicit IOSGyroscope(QSensor *sensor); - ~IOSGyroscope(); + void timerEvent(QTimerEvent *); void start(); void stop(); private: - NSOperationQueue *m_updateQueue; + CMMotionManager *m_motionManager; QGyroscopeReading m_reading; + int m_timer; }; QT_END_NAMESPACE |