+/*
+ * Accelerometer class to access the device accelerometer
+ *
+ * @author Rikhard Kuutti <rikhard.kuutti@fudeco.com>
+ * @author Kai Rasilainen
+ * @copyright (c) 2010 Speed Freak team
+ * @license http://opensource.org/licenses/gpl-license.php GNU Public License
+ */
+
#ifndef ACCELEROMETER_H
#define ACCELEROMETER_H
qreal getTotalAcceleration();
qreal getPreviousTotalAcceleration();
- int calibrationX;
- int calibrationY;
- int calibrationZ;
+ int getCalibrationX();
+ int getCalibrationY();
+ int getCalibrationZ();
qreal getIntervalTime();
+ qreal getTotalTime();
private slots:
void processData();
qreal previousSpeed, currentSpeed;
qreal currentAcceleration, previousAcceleration, totalAcceleration;
+ int calibrationX, calibrationY, calibrationZ;
+
QTime now;
QTimer *timer;
double averageSpeed;
double sampleRate;
- bool reverseAcceleration;
+ bool firstRun;
};
#endif // ACCELEROMETER_H
+