2 * Acceleration info in real time dialog
4 * @author Jukka Kurttila <jukka.kurttila@fudeco.com>
5 * @author Toni Jussila <toni.jussila@fudeco.com>
6 * @copyright (c) 2010 Speed Freak team
7 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
9 #ifndef ACCREALTIMEDIALOG_H
10 #define ACCREALTIMEDIALOG_H
14 #include "accelerometer.h"
15 #include "movingaverage.h"
16 #include "resultdialog.h"
20 class AccRealTimeDialog;
23 class AccRealTimeDialog : public QDialog {
26 AccRealTimeDialog(QWidget *parent = 0);
28 ResultDialog* resultDialog;
30 void startAccelerationMeasure();
31 void SetStopMeasureSpeed(double speed);
34 void changeEvent(QEvent *e);
37 Ui::AccRealTimeDialog *ui;
38 void resetAccelerometerMeasurements();
40 QTimer *accelerometerTimer;
42 Accelerometer* accelerometer;
44 MovingAverage* movingAverageZ;
45 MovingAverage* movingAverageY;
47 int updateScreenCounter;
48 double accelerationStartThreshold;
49 double currentAcceleration;
54 double stopMeasureSpeed;
55 bool vehicleStartedMoving;
62 void on_buttonAbort_clicked();
63 void readAccelerometerData();
64 void sendResult(double);
65 void killResultDialog();
68 void sendresult(double);
71 #endif // ACCREALTIMEDIALOG_H