From 4cf349cf1429055feb45eea7bd7f3be545f51037 Mon Sep 17 00:00:00 2001 From: yxming66 <2389287465@qq.com> Date: Mon, 17 Nov 2025 18:47:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dmotor=5Frm?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- device/motor_rm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/device/motor_rm.c b/device/motor_rm.c index 1e78a47..88c1ef4 100644 --- a/device/motor_rm.c +++ b/device/motor_rm.c @@ -56,12 +56,12 @@ static int8_t MOTOR_RM_GetLogicalIndex(uint16_t can_id, MOTOR_RM_Module_t module switch (module) { case MOTOR_M2006: case MOTOR_M3508: - if (can_id >= M3508_M2006_FB_ID_BASE && can_id < M3508_M2006_FB_ID_BASE + 7) { + if (can_id >= M3508_M2006_FB_ID_BASE && can_id <= M3508_M2006_FB_ID_BASE + 7) { return can_id - M3508_M2006_FB_ID_BASE; } break; case MOTOR_GM6020: - if (can_id >= GM6020_FB_ID_BASE && can_id < GM6020_FB_ID_BASE + 6) { + if (can_id >= GM6020_FB_ID_BASE && can_id <= GM6020_FB_ID_BASE + 6) { return can_id - GM6020_FB_ID_BASE + 4; } break;