|
|
|
@ -115,6 +115,7 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg) |
|
|
|
static int iVehicleSpeed = 1; |
|
|
|
static int iIsStopOffPaint = 0; |
|
|
|
static int iPaint = 1; |
|
|
|
static int iMotorOK = 0; |
|
|
|
switch (pstMsg->m_uiMsgID) |
|
|
|
{ |
|
|
|
case CUSTOM_RESET_PAINT: |
|
|
|
@ -174,6 +175,11 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg) |
|
|
|
} |
|
|
|
break; |
|
|
|
} |
|
|
|
case CUSTOM_GET_MOTOR_OK: |
|
|
|
{ |
|
|
|
iMotorOK = 1; |
|
|
|
break; |
|
|
|
} |
|
|
|
case CUSTOM_CMD_STRAIGHT_DRIVE: |
|
|
|
{ |
|
|
|
MsgCenter_SendTo(MODULE_NAME_TIMER, TIMER_CMD_TURN_UP, NULL, 0); |
|
|
|
@ -292,6 +298,11 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg) |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
if (iMotorOK == 0) // 电机还没初始化完,不执行后边
|
|
|
|
{ |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
// 按键处于默认位置安卓界面可控
|
|
|
|
if ((fabs(g_stMK32.CH2_LY_V) <= 200) && (fabs(g_stMK32.CH3_LY_H) <= 200) |
|
|
|
&& (fabs(g_stMK32.CH0_RY_H) <= 200) && (fabs(g_stMK32.CH1_RY_V) <= 200) |
|
|
|
|