Add distance sensor and display

This commit is contained in:
2026-03-03 21:11:34 -05:00
parent f09e367d53
commit e67d44a536
16 changed files with 288 additions and 27 deletions

View File

@@ -0,0 +1,23 @@
#ifndef CONTROL_DISTANCESENSOR_H
#define CONTROL_DISTANCESENSOR_H
#include "Module.h"
#include "flatbuffers/SensorMessageBuilder.h"
#include "util/Variant.h"
class DistanceSensor : public Module {
public:
DistanceSensor(uint8_t device_id, ModuleType type) : Module(device_id, type) {
}
double get_distance() override;
std::vector<uint8_t> get_actuation_message() override;
void update_sensor_data(const Flatbuffers::sensor_value &value) override;
private:
double m_current_distance = 0.0;
};
#endif // CONTROL_DISTANCESENSOR_H