|
|
@ -51,6 +51,7 @@ static int g_RB_State = 0; // 机器人状态,1表示处于竖直行走模式 |
|
|
static int g_Paint_State = -1; // 喷枪状态,0表示打开,1表示关闭
|
|
|
static int g_Paint_State = -1; // 喷枪状态,0表示打开,1表示关闭
|
|
|
static int angle_protect_lock = 0; // 为1表示角度异常,触发停车逻辑Move_Halt_AngleError
|
|
|
static int angle_protect_lock = 0; // 为1表示角度异常,触发停车逻辑Move_Halt_AngleError
|
|
|
static int g_ipaintOffCount = 0; // Move_Halt_AngleError中的计时,即角度偏移超过多少时间触发停枪
|
|
|
static int g_ipaintOffCount = 0; // Move_Halt_AngleError中的计时,即角度偏移超过多少时间触发停枪
|
|
|
|
|
|
static int Is_All_Button_Reset = 0; // 1表示按钮正常工作,0表示需要复位
|
|
|
|
|
|
|
|
|
/*----------------------------------------------*
|
|
|
/*----------------------------------------------*
|
|
|
* 常量定义 * |
|
|
* 常量定义 * |
|
|
@ -262,6 +263,19 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg) |
|
|
RD_MEMCPY(&g_stMK32, pstMsg->m_aucData, sizeof(g_stMK32)); |
|
|
RD_MEMCPY(&g_stMK32, pstMsg->m_aucData, sizeof(g_stMK32)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (Is_All_Button_Reset == 0) |
|
|
|
|
|
{ |
|
|
|
|
|
if (g_stMK32.CH4_SA == 0 && g_stMK32.CH5_SB == 0 && g_stMK32.CH6_SC == 0 |
|
|
|
|
|
&& g_stMK32.CH7_SD == 0 && g_stMK32.IsOnline == 1) |
|
|
|
|
|
{ |
|
|
|
|
|
Is_All_Button_Reset = 1; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
else if (Is_All_Button_Reset == 1) |
|
|
|
|
|
{ |
|
|
|
|
|
MsgCenter_SendTo(MODULE_NAME_DAEMON, DAEMON_SET_BUTTON_RESET, NULL, 0); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 急停或者遥控器失联
|
|
|
// 急停或者遥控器失联
|
|
|
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) |
|
|
|| g_stMK32.IsOnline == 0 || g_stIV.Left_Motor_Err != 0 || g_stIV.Right_Motor_Err != 0) |
|
|
@ -269,6 +283,7 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg) |
|
|
MsgCenter_SendTo(MODULE_NAME_MOTOR, MOTOR_POWER_DISABLE, NULL, 0); |
|
|
MsgCenter_SendTo(MODULE_NAME_MOTOR, MOTOR_POWER_DISABLE, NULL, 0); |
|
|
MsgCenter_SendTo(MODULE_NAME_RBCORE, RBCORE_CMD_STOP_ALL, NULL, 0); |
|
|
MsgCenter_SendTo(MODULE_NAME_RBCORE, RBCORE_CMD_STOP_ALL, NULL, 0); |
|
|
g_RB_State = 0; |
|
|
g_RB_State = 0; |
|
|
|
|
|
Is_All_Button_Reset = 0; |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|