2 * Acceleration info in real time dialog
4 * @author Jukka Kurttila <jukka.kurttila@fudeco.com>
5 * @copyright (c) 2010 Speed Freak team
6 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
8 #ifndef ACCREALTIMEDIALOG_H
9 #define ACCREALTIMEDIALOG_H
13 #include "accelerometer.h"
14 #include "movingaverage.h"
15 #include "resultdialog.h"
19 class AccRealTimeDialog;
22 class AccRealTimeDialog : public QDialog {
25 AccRealTimeDialog(QWidget *parent = 0);
28 void startAccelerationMeasure();
29 void SetStopMeasureSpeed(double speed);
32 void changeEvent(QEvent *e);
35 void on_buttonAbort_clicked();
36 void readAccelerometerData();
39 Ui::AccRealTimeDialog *ui;
40 void resetAccelerometerMeasurements();
42 QTimer *accelerometerTimer;
44 Accelerometer* accelerometer;
46 MovingAverage* movingAverageZ;
47 ResultDialog* resultDialog;
49 int updateScreenCounter;
50 double accelerationStartThreshold;
51 double currentAcceleration;
56 double stopMeasureSpeed;
57 bool vehicleStartedMoving;
64 #endif // ACCREALTIMEDIALOG_H