|
|
|
@ -366,16 +366,18 @@ static void StateMachine(bool buttonPress) { |
|
|
|
case APP_STATE_MANUAL_MOVE: |
|
|
|
case APP_STATE_MANUAL_MOVE: |
|
|
|
if(REF_GetLineKind(REF_LINE_KIND_MODE_MAZE) == REF_LINE_STRAIGHT){ |
|
|
|
if(REF_GetLineKind(REF_LINE_KIND_MODE_MAZE) == REF_LINE_STRAIGHT){ |
|
|
|
// send to mqtt AUTO
|
|
|
|
// send to mqtt AUTO
|
|
|
|
SHELL_SendString((unsigned char*)"AUTO!!!\r\n"); |
|
|
|
// SHELL_SendString((unsigned char*)"AUTO!!!\r\n");
|
|
|
|
appState = APP_STATE_AUTO; |
|
|
|
|
|
|
|
mazeFailure = 0; |
|
|
|
mazeFailure = 0; |
|
|
|
MAZE_ResetPresentCount(); |
|
|
|
MAZE_ResetPresentCount(); |
|
|
|
presentCnt = 0; |
|
|
|
presentCnt = 0; |
|
|
|
MAZE_ClearSolution(); |
|
|
|
MAZE_ClearSolution(); |
|
|
|
LF_StartFollowing(); |
|
|
|
LF_StartFollowing(); |
|
|
|
BUZ_Beep(1000, 1000); |
|
|
|
// BUZ_Beep(2000, 1000);
|
|
|
|
|
|
|
|
BUZ_PlayTune(BUZ_TUNE_WELCOME); |
|
|
|
McuShell_SendStr((unsigned char*)"mqtt publish \"/mobile/status/mode/\" \"AUTO\"\r\n", McuESP32_GetTxToESPStdio()->stdOut); |
|
|
|
McuShell_SendStr((unsigned char*)"mqtt publish \"/mobile/status/mode/\" \"AUTO\"\r\n", McuESP32_GetTxToESPStdio()->stdOut); |
|
|
|
// McuShell_SendStr((unsigned char*)"\r\n", McuESP32_GetTxToESPStdio()->stdOut);
|
|
|
|
appState = APP_STATE_AUTO; |
|
|
|
|
|
|
|
// McuShell_SendStr((unsigned char*)"\r\n", McuESP32_GetTxToESPStdio()->stdOut);
|
|
|
|
} |
|
|
|
} |
|
|
|
vTaskDelay(pdMS_TO_TICKS(10)); |
|
|
|
vTaskDelay(pdMS_TO_TICKS(10)); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|