|
|
@ -20,6 +20,7 @@ |
|
|
#include "motor_manager.h" |
|
|
#include "motor_manager.h" |
|
|
#include "msp_motor_leisai.h" |
|
|
#include "msp_motor_leisai.h" |
|
|
#include "msg_center.h" |
|
|
#include "msg_center.h" |
|
|
|
|
|
#include "lua_base.h" |
|
|
|
|
|
|
|
|
/*----------------------------------------------*
|
|
|
/*----------------------------------------------*
|
|
|
* 外部变量说明 * |
|
|
* 外部变量说明 * |
|
|
@ -61,7 +62,7 @@ static void Motor_ModuleHandler(const Msg_t *pstMsg) |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
int iSpeed = 1; |
|
|
static int iSpeed = 1; |
|
|
static uint32_t uiLastTime = 0; |
|
|
static uint32_t uiLastTime = 0; |
|
|
switch (pstMsg->m_uiMsgID) |
|
|
switch (pstMsg->m_uiMsgID) |
|
|
{ |
|
|
{ |
|
|
@ -136,6 +137,13 @@ static void Motor_ModuleHandler(const Msg_t *pstMsg) |
|
|
{ |
|
|
{ |
|
|
memset(g_aiMotorSpeed, 0, sizeof(g_aiMotorSpeed)); |
|
|
memset(g_aiMotorSpeed, 0, sizeof(g_aiMotorSpeed)); |
|
|
uiLastTime = Rd_GetTime(); |
|
|
uiLastTime = Rd_GetTime(); |
|
|
|
|
|
g_iLastVehicleMove = 0; |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
case COMMON_CMD_SHOW_INFO: |
|
|
|
|
|
{ |
|
|
|
|
|
lua_print("iSpeed = %d\nuiLastTime = %d\ng_isMotorInit = %d\ng_iLastVehicleMove = %d\n", |
|
|
|
|
|
iSpeed, uiLastTime, g_isMotorInit, g_iLastVehicleMove); |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
default: |
|
|
default: |
|
|
|