修改了can发送演示

This commit is contained in:
Robofish 2025-09-29 20:11:16 +08:00
parent aaa2e773d7
commit 799ad45397
2 changed files with 2 additions and 6 deletions

View File

@ -138,7 +138,7 @@
<DriverSelection>4101</DriverSelection> <DriverSelection>4101</DriverSelection>
</Flash1> </Flash1>
<bUseTDR>1</bUseTDR> <bUseTDR>1</bUseTDR>
<Flash2>BIN\UL2V8M.DLL</Flash2> <Flash2>BIN\UL2CM3.DLL</Flash2>
<Flash3>"" ()</Flash3> <Flash3>"" ()</Flash3>
<Flash4></Flash4> <Flash4></Flash4>
<pFcarmOut></pFcarmOut> <pFcarmOut></pFcarmOut>

View File

@ -337,16 +337,12 @@ void Chassis_Output(Chassis_t *c) {
param.torque = c->output.joint[i].torque; param.torque = c->output.joint[i].torque;
MOTOR_LZ_MotionControl(&c->param->joint_motors[i], &param); MOTOR_LZ_MotionControl(&c->param->joint_motors[i], &param);
} }
BSP_TIME_Delay_us(200); // 等待CAN总线空闲确保前面的命令发送完成 BSP_TIME_Delay_us(400); // 等待CAN总线空闲确保前面的命令发送完成
for (int i = 0; i < 2; i++) { for (int i = 0; i < 2; i++) {
MOTOR_LK_SetOutput(&c->param->wheel_motors[i], c->output.wheel[i]); MOTOR_LK_SetOutput(&c->param->wheel_motors[i], c->output.wheel[i]);
// MOTOR_LK_SetOutput(&c->param->wheel_motors[i], 0.0f); // MOTOR_LK_SetOutput(&c->param->wheel_motors[i], 0.0f);
} }
// 这个函数已经在各个模式中直接调用了电机输出函数
// 如果需要统一输出,可以在这里实现
// 现在的设计是在控制逻辑中直接输出,所以这里留空
} }
int8_t Chassis_LQRControl(Chassis_t *c, const Chassis_CMD_t *c_cmd) { int8_t Chassis_LQRControl(Chassis_t *c, const Chassis_CMD_t *c_cmd) {