17 #include <QtCore/QScopedPointer> 18 #include <QtCore/QThread> 19 #include <QQuaternion> 21 #include <QReadWriteLock> 33 class HardwareAbstractionInterface;
38 class VectorSensorWorker;
54 Status status()
const override;
57 QVector<int> read()
const override;
59 QVector<int> readRawData()
const override;
61 void calibrate(
int msec)
override;
63 QVector<int> getCalibrationValues()
override;
65 void setCalibrationValues(
const QVector<int> &values)
override;
67 bool isCalibrated()
const override;
75 void countCalibrationParameters();
77 void sumAccelerometer(
const QVector<int> &accelerometerData,
const trikKernel::TimeVal & t);
82 QVector3D getEulerAngles(
const QQuaternion &q);
89 QThread mWorkerThread;
91 QTimer mCalibrationTimer;
100 QVector<int> mCalibrationValues;
103 QVector<int> mGyroSum;
112 QVector<int> mResult;
115 QVector<int> mRawData;
122 QVector<int> mAccelerometerVector;
123 QVector<int> mAccelerometerSum;
124 int mAccelerometerCounter;
128 mutable QReadWriteLock mResultLock;
Definition: analogSensor.h:23
Helper class to track device state (off, starting, ready, stopping, fail).
Definition: deviceState.h:26
Sensor that returns a vector.
Definition: vectorSensorInterface.h:29
Structure of a time value in a convenient format.
Definition: timeVal.h:20
Handles events from sensor, intended to work in separate thread.
Definition: vectorSensorWorker.h:35
Status
Device status.
Definition: deviceInterface.h:33
Definition: trikCommunicator.h:27
Sensor that returns a vector.
Definition: gyroSensor.h:41
Class that returns raw and processed data from the gyroscope.
Definition: gyroSensorInterface.h:27
Definition: brickFactory.h:21
Hardware abstraction, provides devices that are used to communicate with robot hardware or emulate it...
Definition: hardwareAbstractionInterface.h:29