forked from BastianGschrey/PowerTune
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sensors.h
57 lines (42 loc) · 1.19 KB
/
sensors.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#ifndef SENSORS_H
#define SENSORS_H
#include <QObject>
#include <QAccelerometer>
#include <QGyroscope>
#include <QCompass>
#include <QAmbientTemperatureSensor>
#include <QPressureSensor>
class Sensors;
class DashBoard;
class Sensors : public QObject
{
Q_OBJECT
public:
explicit Sensors(QObject *parent = 0);
explicit Sensors(DashBoard *dashboard, QObject *parent = 0);
Q_INVOKABLE void Comp();
Q_INVOKABLE void Accel();
Q_INVOKABLE void Gyro();
Q_INVOKABLE void Temperature();
Q_INVOKABLE void Pressure();
public slots:
void updateCompass();
void updateAccel();
void updateGyro();
void updateAmbientSens();
void updatePressureSens();
void error(int);
private:
DashBoard *m_dashboard;
QCompass *Compass;
QAccelerometer *Accelerometer;
QGyroscope *Gyroscope;
QAmbientTemperatureSensor *AmbientTemperatureSensor;
QPressureSensor *PressureSensor;
QCompassReading *compass_reading;
QAccelerometerReading *accel_reading;
QGyroscopeReading *gyro_reading;
QAmbientTemperatureReading *temp_reading;
QPressureReading *press_reading;
};
#endif // SENSORS_H