修复电机反馈的bug,通信bug,ps2手柄支持,舵机的修复,cmdbug的修复

This commit is contained in:
chenfu
2023-03-22 16:37:12 +08:00
parent 3cf1831237
commit 58db6e5705
25 changed files with 231 additions and 145 deletions

View File

@@ -110,7 +110,7 @@ void LKMotorControl()
}
set = pid_ref;
if (setting->reverse_flag == MOTOR_DIRECTION_REVERSE)
if (setting->motor_reverse_flag == MOTOR_DIRECTION_REVERSE)
set *= -1;
// 这里随便写的,为了兼容多电机命令.后续应该将tx_id以更好的方式表达电机id,单独使用一个CANInstance,而不是用第一个电机的CANInstance
memcpy(sender_instance->tx_buff + (motor->motor_can_ins->tx_id - 0x280) * 2, &set, sizeof(uint16_t));