Add distance sensor, rewrite OLED to use new i2c library

This commit is contained in:
2026-02-19 14:48:31 -05:00
parent 29b79fbbb5
commit 20b047bbfe
31 changed files with 3040 additions and 122 deletions

View File

@@ -0,0 +1,15 @@
#include <memory>
#include "control/SensorFactory.h"
#include "control/DistanceSensor.h"
#include "flatbuffers_generated/RobotModule_generated.h"
std::unique_ptr<ISensor> SensorFactory::create_sensor(const ModuleType type) {
switch (type) {
case ModuleType_DISTANCE_SENSOR:
return std::make_unique<DistanceSensor>();
default:
return nullptr;
}
}