26 lines
530 B
C++
26 lines
530 B
C++
#ifndef IMU_SENSOR_THING_H
|
|
#define IMU_SENSOR_THING_H
|
|
|
|
#include "iot/thing.h"
|
|
#include "boards/common/qmi8658a.h"
|
|
|
|
namespace iot {
|
|
|
|
class ImuSensorThing : public Thing {
|
|
private:
|
|
QMI8658A* imu_sensor_;
|
|
qmi8658a_data_t latest_data_;
|
|
bool motion_detected_;
|
|
float motion_threshold_;
|
|
|
|
public:
|
|
ImuSensorThing(QMI8658A* sensor);
|
|
virtual ~ImuSensorThing() = default;
|
|
|
|
void UpdateData(const qmi8658a_data_t& data);
|
|
void SetMotionDetected(bool detected);
|
|
};
|
|
|
|
} // namespace iot
|
|
|
|
#endif // IMU_SENSOR_THING_H
|