mirror of
https://github.com/BotChain-Robots/firmware.git
synced 2026-07-08 17:47:21 +02:00
UDP implementation
This commit is contained in:
@@ -9,15 +9,16 @@
|
||||
#include "control/Servo1Actuator.h"
|
||||
#include "flatbuffers_generated/RobotModule_generated.h"
|
||||
|
||||
std::unique_ptr<IActuator> ActuatorFactory::create_actuator(const ModuleType type) {
|
||||
switch (type) {
|
||||
case ModuleType_SERVO_1:
|
||||
return std::make_unique<Servo1Actuator>();
|
||||
case ModuleType_SERVO_2:
|
||||
return std::make_unique<Servo1Actuator>();
|
||||
case ModuleType_DC_MOTOR:
|
||||
return std::make_unique<DCMotorActuator>();
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
std::unique_ptr<IActuator>
|
||||
ActuatorFactory::create_actuator(const ModuleType type) {
|
||||
switch (type) {
|
||||
case ModuleType_SERVO_1:
|
||||
return std::make_unique<Servo1Actuator>();
|
||||
case ModuleType_SERVO_2:
|
||||
return std::make_unique<Servo1Actuator>();
|
||||
case ModuleType_DC_MOTOR:
|
||||
return std::make_unique<DCMotorActuator>();
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user