cleanup: remove unused motor drivers and simplify motor_def.h
- Remove DJImotor, HTmotor, LKmotor, step_motor, servo_motor directories - Remove Motor_Control_Setting_s and related enums (Closeloop_Type_e, Feedback_Source_e, Feedfoward_Type_e, MOTOR_SEND_MODE_e, Motor_Working_Type_e) - Merge motor_reverse_flag and feedback_reverse_flag into output_reverse - Hardcode DM motor control: IMU angle feedback → angle PID → velocity output - Simplify Motor_Init_Config_s to only: PID params, output_reverse, motor_type, CAN config
This commit is contained in:
@@ -48,16 +48,16 @@ typedef struct
|
||||
typedef struct
|
||||
{
|
||||
DM_Motor_Measure_s measure;
|
||||
Motor_Control_Setting_s motor_settings;
|
||||
Motor_Controller_s motor_controller;
|
||||
|
||||
CANInstance *motor_can_instance; // CAN communication instance
|
||||
DaemonInstance *motor_daemon; // daemon watchdog
|
||||
DM_Motor_Mode_e ctrl_mode; // current control mode (MIT / Pos-Vel / Velocity)
|
||||
float mit_kp; // MIT mode KP (motor internal position gain, 0~500)
|
||||
float mit_kd; // MIT mode KD (motor internal velocity gain, 0~5)
|
||||
Output_Reverse_Flag_e output_reverse; // output reverse flag
|
||||
DM_Motor_Mode_e ctrl_mode; // current control mode (MIT / Pos-Vel / Velocity)
|
||||
float mit_kp; // MIT mode KP (motor internal position gain, 0~500)
|
||||
float mit_kd; // MIT mode KD (motor internal velocity gain, 0~5)
|
||||
|
||||
float pid_ref; // reference input from application
|
||||
float pid_ref; // reference input from application
|
||||
} DMMotorInstance;
|
||||
|
||||
/* DM motor init config */
|
||||
@@ -83,7 +83,6 @@ typedef enum
|
||||
DMMotorInstance *DMMotorInit(DM_Motor_Init_Config_s *config);
|
||||
|
||||
void DMMotorSetRef(DMMotorInstance *motor, float ref);
|
||||
void DMMotorOuterLoop(DMMotorInstance *motor, Closeloop_Type_e type);
|
||||
void DMMotorSetCtrlMode(DMMotorInstance *motor, DM_Motor_Mode_e mode);
|
||||
void DMMotorSetMode(DMMotor_Mode_e mode, DMMotorInstance *motor);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user