mirror of
https://github.com/BotChain-Robots/firmware.git
synced 2026-07-08 17:47:21 +02:00
Add distance sensor, rewrite OLED to use new i2c library
This commit is contained in:
@@ -11,13 +11,15 @@
|
||||
|
||||
#include "MessagingInterface.h"
|
||||
#include "control/ActuatorFactory.h"
|
||||
#include "control/SensorFactory.h"
|
||||
#include "control/IActuator.h"
|
||||
|
||||
class LoopManager {
|
||||
public:
|
||||
LoopManager() : m_config_manager(ConfigManager::get_instance()),
|
||||
m_messaging_interface(std::make_unique<MessagingInterface>()),
|
||||
m_actuator(ActuatorFactory::create_actuator(m_config_manager.get_module_type())) {
|
||||
m_actuator(ActuatorFactory::create_actuator(m_config_manager.get_module_type())),
|
||||
m_sensor(SensorFactory::create_sensor(m_config_manager.get_module_type())) {
|
||||
xTaskCreate(reinterpret_cast<TaskFunction_t>(LoopManager::metadata_tx_loop),
|
||||
"metadata_tx", 3096, this, 3, nullptr);
|
||||
xTaskCreate(reinterpret_cast<TaskFunction_t>(LoopManager::sensor_loop),
|
||||
@@ -43,6 +45,7 @@ private:
|
||||
ConfigManager& m_config_manager;
|
||||
std::unique_ptr<MessagingInterface> m_messaging_interface;
|
||||
std::unique_ptr<IActuator> m_actuator;
|
||||
std::unique_ptr<ISensor> m_sensor;
|
||||
|
||||
void send_sensor_reading(bool durable) const;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user