Changed "registrate" to "register"
[speedfreak] / Client / accelerometer.h
1 /*
2  * Accelerometer class to access the device accelerometer
3  *
4  * @author      Rikhard Kuutti <rikhard.kuutti@fudeco.com>
5  * @author      Kai Rasilainen <kai.rasilainen@fudeco.com>
6  * @author      Jukka Kurttila <jukka.kurttila@fudeco.com>
7  * @copyright   (c) 2010 Speed Freak team
8  * @license     http://opensource.org/licenses/gpl-license.php GNU Public License
9  */
10
11 #ifndef ACCELEROMETER_H
12 #define ACCELEROMETER_H
13
14 #include <QObject>
15
16 #include "calculate.h"
17 #include "calibratedialog.h"
18
19 class Accelerometer : public QObject
20 {
21     Q_OBJECT
22 public:
23     Accelerometer();
24     ~Accelerometer();
25
26     void getAcceleration(qreal &x, qreal &y, qreal &z);
27     void smoothData(qreal &x, qreal &y, qreal &z);
28     void calibrate();
29     void initValues();
30
31     qreal getCalibrationX();
32     qreal getCalibrationY();
33     qreal getCalibrationZ();
34
35 private:
36     qreal previousAccelerationX, previousAccelerationY, previousAccelerationZ;
37     qreal calibrationX, calibrationY, calibrationZ;
38
39     CalibrateDialog *calibrateDialog;
40 };
41
42 #endif // ACCELEROMETER_H