refactor: migrate from DJI motors to DM motors, simplify to gimbal-only control
- Rewrite DM motor driver based on DM_6220 reference protocol (MIT/PosVel/Velocity modes) - Use velocity control mode: MCU runs angle PID with IMU feedback, motor handles speed loop - Rewrite vision protocol with 3 frame types (0xA5 auto data, 0xA6 manual data, 0xA7 command) - Decouple serial parsing (opencv module) from mode switching (robot_cmd module) - Implement dual-loop architecture: vision PID outer loop → angle ref → motor PID inner loop - Add KF/PID reset on mode switch transitions - Merge motor_reverse_flag and feedback_reverse_flag into single output_reverse flag - Remove DMMotorEnable/DMMotorStop (motor always runs, controlled by angle ref) - Remove unused modules: DJI/LK/HT/step/servo motors, chassis, shoot, referee - Add ExitRun0Mode() for STM32H723 power supply configuration - Clean up CMakeLists: 115 → 76 C source files
This commit is contained in:
+2
-2
@@ -46,7 +46,7 @@ void MX_FDCAN1_Init(void)
|
||||
hfdcan1.Init.TransmitPause = DISABLE;
|
||||
hfdcan1.Init.ProtocolException = ENABLE;
|
||||
hfdcan1.Init.NominalPrescaler = 3;
|
||||
hfdcan1.Init.NominalSyncJumpWidth = 1;
|
||||
hfdcan1.Init.NominalSyncJumpWidth = 10;
|
||||
hfdcan1.Init.NominalTimeSeg1 = 29;
|
||||
hfdcan1.Init.NominalTimeSeg2 = 10;
|
||||
hfdcan1.Init.DataPrescaler = 3;
|
||||
@@ -54,7 +54,7 @@ void MX_FDCAN1_Init(void)
|
||||
hfdcan1.Init.DataTimeSeg1 = 29;
|
||||
hfdcan1.Init.DataTimeSeg2 = 10;
|
||||
hfdcan1.Init.MessageRAMOffset = 0;
|
||||
hfdcan1.Init.StdFiltersNbr = 14;
|
||||
hfdcan1.Init.StdFiltersNbr = 1;
|
||||
hfdcan1.Init.ExtFiltersNbr = 0;
|
||||
hfdcan1.Init.RxFifo0ElmtsNbr = 4;
|
||||
hfdcan1.Init.RxFifo0ElmtSize = FDCAN_DATA_BYTES_8;
|
||||
|
||||
Reference in New Issue
Block a user