mirror of
https://github.com/BotChain-Robots/firmware.git
synced 2026-07-08 09:37:21 +02:00
Add gripper module
This commit is contained in:
@@ -14,7 +14,8 @@ inline std::unordered_map<int, int> MODULE_TO_NUM_CHANNELS_MAP {
|
|||||||
{ModuleType_SERVO_1, 2},
|
{ModuleType_SERVO_1, 2},
|
||||||
{ModuleType_DC_MOTOR, 1},
|
{ModuleType_DC_MOTOR, 1},
|
||||||
{ModuleType_SERVO_2, 2},
|
{ModuleType_SERVO_2, 2},
|
||||||
{ModuleType_DISPLAY, 1}
|
{ModuleType_DISPLAY, 1},
|
||||||
|
{ModuleType_GRIPPER, 1},
|
||||||
};
|
};
|
||||||
|
|
||||||
#define PC_ADDR 0
|
#define PC_ADDR 0
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ ActuatorFactory::create_actuator(const ModuleType type) {
|
|||||||
return std::make_unique<Servo1Actuator>();
|
return std::make_unique<Servo1Actuator>();
|
||||||
case ModuleType_SERVO_2:
|
case ModuleType_SERVO_2:
|
||||||
return std::make_unique<Servo1Actuator>();
|
return std::make_unique<Servo1Actuator>();
|
||||||
|
case ModuleType_GRIPPER:
|
||||||
|
return std::make_unique<Servo1Actuator>();
|
||||||
case ModuleType_DC_MOTOR:
|
case ModuleType_DC_MOTOR:
|
||||||
return std::make_unique<DCMotorActuator>();
|
return std::make_unique<DCMotorActuator>();
|
||||||
case ModuleType_DISPLAY:
|
case ModuleType_DISPLAY:
|
||||||
|
|||||||
Reference in New Issue
Block a user