解决隐藏bug(数组越界)

This commit is contained in:
zyx 2024-11-23 10:20:12 +08:00
parent 3583e1c337
commit 494eb1a14d
2 changed files with 4 additions and 3 deletions

View File

@ -63,7 +63,7 @@ void ShootInit()
Motor_Init_Config_s loader_config = { Motor_Init_Config_s loader_config = {
.can_init_config = { .can_init_config = {
.can_handle = &hcan2, .can_handle = &hcan2,
.tx_id = 1 .tx_id = 1,
}, },
.controller_param_init_config = { .controller_param_init_config = {
.angle_PID = { .angle_PID = {

View File

@ -44,10 +44,11 @@ static CANInstance sender_assignment[10] = {
}; };
/** /**
* @brief 6sender_assignment中的标志位,,DJIMotorControl()使 * @brief 10sender_assignment中的标志位,,DJIMotorControl()使
* flag的初始化在 MotorSenderGrouping() * flag的初始化在 MotorSenderGrouping()
* 6
*/ */
static uint8_t sender_enable_flag[6] = {0}; static uint8_t sender_enable_flag[10] = {0};
/** /**
* @brief /ID,id分配方式计算发送ID和接收ID, * @brief /ID,id分配方式计算发送ID和接收ID,