|
|
|
@ -67,7 +67,7 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg) |
|
|
|
|
|
|
|
switch (pstMsg->m_uiMsgID) |
|
|
|
{ |
|
|
|
case MOTOR_GET_FAULT_CODE: |
|
|
|
case CUSTOM_GET_FAULT_CODE: |
|
|
|
{ |
|
|
|
uint32_t uiFailtCode[2] = {0}; |
|
|
|
if (pstMsg->m_uiDataLen >= sizeof(uiFailtCode)) |
|
|
|
@ -76,7 +76,7 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg) |
|
|
|
} |
|
|
|
break; |
|
|
|
} |
|
|
|
case MOTOR_GET_SPEED: |
|
|
|
case CUSTOM_GET_SPEED: |
|
|
|
{ |
|
|
|
int32_t iCurrentSpeed[2] = {0}; |
|
|
|
if (pstMsg->m_uiDataLen >= sizeof(iCurrentSpeed)) |
|
|
|
@ -145,7 +145,7 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg) |
|
|
|
|
|
|
|
if (abs(g_stMK32.CH2_LY_V) <= g_stCV.Joy_Sticker_Value_Allowance && abs(g_stMK32.CH3_LY_H) <= g_stCV.Joy_Sticker_Value_Allowance) |
|
|
|
{ |
|
|
|
MsgCenter_SendTo(MODULE_NAME_RBCORE, RBCORE_CMD_STOP_ALL, NULL, 0); |
|
|
|
MsgCenter_SendTo(MODULE_NAME_RBCORE, COMMON_CMD_STOP_ALL, NULL, 0); |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
@ -169,11 +169,11 @@ static void Custom_ModuleHandler(const Msg_t *pstMsg) |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
MsgCenter_SendTo(MODULE_NAME_RBCORE, RBCORE_CMD_STOP_ALL, NULL, 0); |
|
|
|
MsgCenter_SendTo(MODULE_NAME_RBCORE, COMMON_CMD_STOP_ALL, NULL, 0); |
|
|
|
} |
|
|
|
break; |
|
|
|
} |
|
|
|
case LUA_SHOW_INFO: |
|
|
|
case COMMON_CMD_SHOW_INFO: |
|
|
|
{ |
|
|
|
lua_print("MK32 Info\nRxIndex:%d\tIsOnline:%d\n", g_stMK32.RxIndex, g_stMK32.IsOnline); |
|
|
|
lua_print("CH0_RY_H\t%d\n", g_stMK32.CH0_RY_H); |
|
|
|
@ -214,7 +214,7 @@ void Custom_Task(void *argument) |
|
|
|
if ((int32_t)(uiNowTick - uiLastSendTick) >= IV_SEND_TIME) |
|
|
|
{ |
|
|
|
uiLastSendTick = uiNowTick; |
|
|
|
MsgCenter_SendTo(MODULE_NAME_SENDIV, CUSTOM_SET_IV, (void *)&g_stIV, sizeof(g_stIV)); |
|
|
|
MsgCenter_SendTo(MODULE_NAME_SENDIV, SENDIV_SET_IV, (void *)&g_stIV, sizeof(g_stIV)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|