解决隐藏bug(数组越界)
This commit is contained in:
parent
3583e1c337
commit
494eb1a14d
|
@ -63,7 +63,7 @@ void ShootInit()
|
|||
Motor_Init_Config_s loader_config = {
|
||||
.can_init_config = {
|
||||
.can_handle = &hcan2,
|
||||
.tx_id = 1
|
||||
.tx_id = 1,
|
||||
},
|
||||
.controller_param_init_config = {
|
||||
.angle_PID = {
|
||||
|
|
|
@ -44,10 +44,11 @@ static CANInstance sender_assignment[10] = {
|
|||
};
|
||||
|
||||
/**
|
||||
* @brief 6个用于确认是否有电机注册到sender_assignment中的标志位,防止发送空帧,此变量将在DJIMotorControl()使用
|
||||
* @brief 10个用于确认是否有电机注册到sender_assignment中的标志位,防止发送空帧,此变量将在DJIMotorControl()使用
|
||||
* flag的初始化在 MotorSenderGrouping()中进行
|
||||
* 6个会发生数组越界
|
||||
*/
|
||||
static uint8_t sender_enable_flag[6] = {0};
|
||||
static uint8_t sender_enable_flag[10] = {0};
|
||||
|
||||
/**
|
||||
* @brief 根据电调/拨码开关上的ID,根据说明书的默认id分配方式计算发送ID和接收ID,
|
||||
|
|
Loading…
Reference in New Issue