23 lines
457 B
C++
23 lines
457 B
C++
#ifndef ACCELEROMETERSENSOR_H
|
|
#define ACCELEROMETERSENSOR_H
|
|
|
|
#include "Sensor.h"
|
|
|
|
struct AccelerometerData {
|
|
float x;
|
|
float y;
|
|
float z;
|
|
AccelerometerData(const float x, const float y, const float z) : x(x), y(y), z(z) {;}
|
|
std::string asString() const {
|
|
std::stringstream ss;
|
|
ss << "(" << x << "," << y << "," << z << ")";
|
|
return ss.str();
|
|
}
|
|
};
|
|
|
|
class AccelerometerSensor : public Sensor<AccelerometerData> {
|
|
|
|
};
|
|
|
|
#endif // ACCELEROMETERSENSOR_H
|