|
|
|
|
@ -144,8 +144,14 @@ uint8_t MAZE_EvaluteTurn(bool *finished, bool *deadEndGoBw) { |
|
|
|
|
*deadEndGoBw = FALSE; /* default */ |
|
|
|
|
currLineKind = REF_GetLineKind(REF_LINE_KIND_MODE_MAZE); |
|
|
|
|
if (currLineKind==REF_LINE_NONE) { /* nothing, must be dead end */ |
|
|
|
|
#if PL_GO_DEADEND_BW |
|
|
|
|
TURN_Turn(TURN_STEP_LINE_BW, NULL); /* step back so we are again on the line for line following */ |
|
|
|
|
turn = TURN_STRAIGHT; |
|
|
|
|
*deadEndGoBw = TRUE; |
|
|
|
|
#else |
|
|
|
|
turn = TURN_LEFT180; |
|
|
|
|
} else { |
|
|
|
|
#endif |
|
|
|
|
} else { |
|
|
|
|
HISTORY_Clear(); /* clear history values */ |
|
|
|
|
HISTORY_SampleSensors(); /* store current values */ |
|
|
|
|
#if PL_CONFIG_USE_QUADRATURE |
|
|
|
|
|