// // Created by iflyt on 2025/3/3. // #ifndef MOTOR_MANAGER_H #define MOTOR_MANAGER_H #include "elc_motor.h" class MotorManager { private: static MotorManager* instance; MotorManager(); MotorManager(const MotorManager&) = delete; MotorManager& operator=(const MotorManager&) = delete; public: ECLMotor motors[3]; static MotorManager* ins(); int32_t getMotorPosition(int motorIndex); void setMotorTargetPosition(int motorIndex, int32_t targetPosition); void setMotorSpeed(int motorIndex, int32_t speed); int32_t getMotorSpeed(int motorIndex); uint8_t getMotorMovingStatus(int motorIndex); int32_t getMotorEncoderPosition(int motorIndex); void setMotorEncoderPosition(int motorIndex, int32_t encoderPos); }; #endif //MOTOR_MANAGER_H