From 37f2076d3b1186a871cc03d551e8a8e00c19f5a8 Mon Sep 17 00:00:00 2001 From: Lizongdi <1210855344@qq.com> Date: Tue, 15 Sep 2026 14:30:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E6=8A=A5=E9=81=A5=E6=8E=A7=E5=99=A8?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E7=8A=B6=E6=80=81=EF=BC=9B=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=BD=93=E7=94=B5=E6=9C=BA=E6=9C=89=E6=8A=A5=E8=AD=A6=E7=A0=81?= =?UTF-8?q?=E6=88=96=E9=81=A5=E6=8E=A7=E5=99=A8=E5=85=B3=E6=9C=BA=E6=97=B6?= =?UTF-8?q?=E6=80=A5=E5=81=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/paint_robot_new/paint_robot_new.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/project/paint_robot_new/paint_robot_new.c b/project/paint_robot_new/paint_robot_new.c index 236c8f1..55d9fc5 100644 --- a/project/paint_robot_new/paint_robot_new.c +++ b/project/paint_robot_new/paint_robot_new.c @@ -262,8 +262,9 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg) RD_MEMCPY(&g_stMK32, pstMsg->m_aucData, sizeof(g_stMK32)); } - // 急停 - if (g_stMK32.CH8_SE == -1000 && g_stMK32.CH9_SF == -1000) + // 急停或者遥控器失联 + if ((g_stMK32.CH8_SE == -1000 && g_stMK32.CH9_SF == -1000) + || g_stMK32.IsOnline == 0 || g_stIV.Left_Motor_Err != 0 || g_stIV.Right_Motor_Err != 0) { MsgCenter_SendTo(MODULE_NAME_MOTOR, MOTOR_POWER_DISABLE, NULL, 0); MsgCenter_SendTo(MODULE_NAME_RBCORE, RBCORE_CMD_STOP_ALL, NULL, 0); @@ -526,6 +527,7 @@ void Custom_Task(void *argument) if ((int32_t)(uiNowTick - uiLastSendTick) >= IV_SEND_TIME) { uiLastSendTick = uiNowTick; + g_stIV.SBUS_State = g_stMK32.IsOnline; MsgCenter_SendTo(MODULE_NAME_SENDIV, SENDIV_SET_IV, (void *)&g_stIV, sizeof(g_stIV)); } }