diff --git a/ADIS_Sumo/Sumo/Application.c b/ADIS_Sumo/Sumo/Application.c index bcb2f98..5affd20 100644 --- a/ADIS_Sumo/Sumo/Application.c +++ b/ADIS_Sumo/Sumo/Application.c @@ -389,19 +389,20 @@ static void StateMachine(bool buttonPress) { // McuShell_SendStr((unsigned char*)"\r\n", McuESP32_GetTxToESPStdio()->stdOut); appState = APP_STATE_IDLE; mazeFailure=0; - }else if(!LF_IsFollowing() && !MAZE_IsSolved() && mazeFailure < 5){ + }else if(!LF_IsFollowing() && !MAZE_IsSolved()){// && mazeFailure < 5){ // failed - mazeFailure++; +// mazeFailure++; MAZE_ClearSolution(); DRV_SetSpeed(0, 0); DRV_SetMode(DRV_MODE_SPEED); LF_StartFollowing(); - }else if(!LF_IsFollowing() && !MAZE_IsSolved() && mazeFailure >= 5){ - BUZ_Beep(1000, 1000); - McuShell_SendStr((unsigned char*)"mqtt publish \"/mobile/status/mode/\" \"FAILURE\"\r\n", McuESP32_GetTxToESPStdio()->stdOut); -// McuShell_SendStr((unsigned char*)"\r\n", McuESP32_GetTxToESPStdio()->stdOut); - appState = APP_STATE_IDLE; } +// }else if(!LF_IsFollowing() && !MAZE_IsSolved() && mazeFailure >= 5){ +// BUZ_Beep(1000, 1000); +// McuShell_SendStr((unsigned char*)"mqtt publish \"/mobile/status/mode/\" \"FAILURE\"\r\n", McuESP32_GetTxToESPStdio()->stdOut); +//// McuShell_SendStr((unsigned char*)"\r\n", McuESP32_GetTxToESPStdio()->stdOut); +// appState = APP_STATE_IDLE; +// } if(MAZE_GetPresentCount() != presentCnt){ presentCnt = MAZE_GetPresentCount(); //publish diff --git a/ADIS_Sumo/Sumo/Turn.c b/ADIS_Sumo/Sumo/Turn.c index 196809b..f725731 100644 --- a/ADIS_Sumo/Sumo/Turn.c +++ b/ADIS_Sumo/Sumo/Turn.c @@ -63,11 +63,11 @@ #define TURN_STEPS_POST_LINE_TIMEOUT_MS 500 #define TURN_STEPS_STOP_TIMEOUT_MS 150 #elif PL_IS_INTRO_ZUMO_K22 /* no LiPo */ - #define TURN_STEPS_90 650//720 + #define TURN_STEPS_90 720 /*!< number of steps for a 90 degree turn */ - #define TURN_STEPS_LINE 170//100 /*230*/ + #define TURN_STEPS_LINE 100 /*230*/ /*!< number of steps stepping over the line */ - #define TURN_STEPS_POST_LINE 240//150 + #define TURN_STEPS_POST_LINE 150 /*!< number of steps after the line, before making a turn */ #define TURN_STEPS_90_TIMEOUT_MS 1000 #define TURN_STEPS_LINE_TIMEOUT_MS 200