sensorfw: adaptors/mpu6050accelerometer/mpu6050accelerometeradaptor.h Source File

sensorfw

mpu6050accelerometeradaptor.h
Go to the documentation of this file.
1
21#ifndef MPU6050ACCELEROMETERADPTOR_H
22#define MPU6050ACCELEROMETERADPTOR_H
23#include "sysfsadaptor.h"
24#include <QString>
25#include <QStringList>
26#include <linux/input.h>
27#include "deviceadaptorringbuffer.h"
28#include "datatypes/orientationdata.h"
29#include <QTime>
30
31#define X_AXIS 1
32#define Y_AXIS 2
33#define Z_AXIS 3
34
35 class Mpu6050AccelAdaptor : public SysfsAdaptor {
36 Q_OBJECT
37
38 public:
39 static DeviceAdaptor* factoryMethod (const QString& id) {
40 return new Mpu6050AccelAdaptor (id);
41 }
42 Mpu6050AccelAdaptor (const QString& id);
43 ~Mpu6050AccelAdaptor ();
44
45 bool startSensor ();
46 void stopSensor ();
47
48 protected:
49 void processSample (int pathId, int fd);
50
51 private:
52 DeviceAdaptorRingBuffer<OrientationData>* buffer;
53 OrientationData *currentData;
54};
55#endif
Mpu6050AccelAdaptor
Definition: mpu6050accelerometeradaptor.h:35
Mpu6050AccelAdaptor::processSample
void processSample(int pathId, int fd)
Mpu6050AccelAdaptor::stopSensor
void stopSensor()
Mpu6050AccelAdaptor::factoryMethod
static DeviceAdaptor * factoryMethod(const QString &id)
Definition: mpu6050accelerometeradaptor.h:39
Mpu6050AccelAdaptor::Mpu6050AccelAdaptor
Mpu6050AccelAdaptor(const QString &id)
Mpu6050AccelAdaptor::~Mpu6050AccelAdaptor
~Mpu6050AccelAdaptor()
Mpu6050AccelAdaptor::startSensor
bool startSensor()
TimedXyzData
Class for vector type measurement data (timestamp, x, y, z).
Definition: genericdata.h:53
orientationdata.h
Datatypes for different filters.