Browse Source

【待优化】解决遥控器有时候状态不对但是online仍为0时的误判

paint_robot_new-v1.5
Lizongdi 2 weeks ago
parent
commit
e16f6257d2
  1. 4
      project/paint_robot_new/paint_robot_new.c

4
project/paint_robot_new/paint_robot_new.c

@ -279,7 +279,9 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg)
// 急停或者遥控器失联
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)
|| (g_stMK32.IsOnline == 0 && (g_stMK32.CH8_SE == -1000 || g_stMK32.CH8_SE == 1000 || g_stMK32.CH8_SE == 0)
&& (g_stMK32.CH9_SF == -1000 || g_stMK32.CH9_SF == 1000 || g_stMK32.CH9_SF == 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);

Loading…
Cancel
Save