Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed 3875_Individualproject
Diff: main/main.cpp
- Revision:
- 36:1af069be0fdb
- Parent:
- 35:2fd4ee9ac889
- Child:
- 37:2967f3f9c936
--- a/main/main.cpp Tue Apr 14 00:41:17 2020 +0000 +++ b/main/main.cpp Tue Apr 14 14:47:34 2020 +0000 @@ -231,8 +231,8 @@ robot.lcd_goto_xy(5,1); robot.lcd_print(buffer3,2); - robot.stop(); - wait(2); +// robot.stop(); +// wait(2); // use current coords to find which point to place in path @@ -338,8 +338,8 @@ } } - robot.stop(); - wait(1); +// robot.stop(); +// wait(1); // if(goal) { // if( dir == 'N' ) { south = true; _explored |= 0b0001; } // sets the direction opposite to entry direction as an explored path @@ -429,6 +429,7 @@ if (unexp_paths == 0b0000) { back_track(); + unexp_paths = type[curr_index] & ~( explored[curr_index] ); } int curr_angle = 0; @@ -512,19 +513,19 @@ if( dir_diff == 'N' ) { explored[curr_node] &= 0b1011; - explored[prev_node] &= 0b1110; + //explored[prev_node] &= 0b1110; } else if( dir_diff == 'E' ) { explored[curr_node] &= 0b1101; - explored[prev_node] &= 0b0111; + //explored[prev_node] &= 0b0111; } else if( dir_diff == 'S' ) { explored[curr_node] &= 0b1110; - explored[prev_node] &= 0b1011; + //explored[prev_node] &= 0b1011; } else if( dir_diff == 'W' ) { explored[curr_node] &= 0b0111; - explored[prev_node] &= 0b1101; + //explored[prev_node] &= 0b1101; } if(point[prev_node] == point[pointer]) { break; }