From 62b1783b5983617a1b244f569803a04c7cf6f58a Mon Sep 17 00:00:00 2001 From: NeoZeng Date: Sun, 20 Nov 2022 17:17:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DGM6020=E7=94=B5=E6=9C=BA?= =?UTF-8?q?=E6=8E=A5=E6=94=B6ID=E8=AE=A1=E7=AE=97=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/motor/dji_motor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/motor/dji_motor.c b/modules/motor/dji_motor.c index 2978e77..1e04fb8 100644 --- a/modules/motor/dji_motor.c +++ b/modules/motor/dji_motor.c @@ -95,7 +95,7 @@ static void MotorSenderGrouping(can_instance_config_s *config) motor_grouping = config->can_handle == &hcan1 ? 2 : 5; } - config->rx_id = 0x204 + motor_id; + config->rx_id = 0x204 + motor_id + 1; sender_enable_flag[motor_grouping] = 1; dji_motor_info[idx]->message_num = motor_send_num; dji_motor_info[idx]->sender_group = motor_grouping; @@ -234,7 +234,7 @@ void DJIMotorControl() motor_controller->pid_ref = PID_Calculate(&motor_controller->current_PID, motor_measure->given_current, motor_controller->pid_ref); } - set = (int16_t)motor_controller->pid_ref; // 获取最终输出 + set = (int16_t)motor_controller->pid_ref; // 获取最终输出 if (motor_setting->reverse_flag == MOTOR_DIRECTION_REVERSE) // 设置反转 set *= -1;