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:
- 62:69de8a0d2ced
- Parent:
- 61:b31d8c997279
- Child:
- 63:0358f24b6181
--- a/main/main.cpp Sat Apr 18 18:28:16 2020 +0000 +++ b/main/main.cpp Sat Apr 18 20:45:09 2020 +0000 @@ -441,8 +441,6 @@ // // print_data("After Turn"); -// if( turn_angle != 180 ) { robot.forward(speed); wait(0.05); } // maybe remove - if( turn_angle == 0) { robot.forward(speed); wait(0.1); turn_select('S'); } else if( turn_angle == 90) { robot.forward(speed); wait(0.03); turn_select('R'); } else if( turn_angle == 180) { turn_select('B'); } @@ -454,8 +452,8 @@ // find the closest previous node with unexplored paths and go back through the path until reaching that node, updating the path and directions appropriately, then choose turn // also if no nodes have unexplored paths set complete to true - bool fully_explored = true; - + bool fully_explored = true; + int d_node; // an index to the most recent (desired) node with unexplored paths for(int i = total_points; i >= 0; i--) { // start from the most recently discovered node @@ -481,6 +479,10 @@ // which ever is shorter, set the 0 of those nodes // robot.stop(); +// robot.lcd_print("bt",2); +// wait(1); +// robot.lcd_clear(); +// // char buf1[2], buf2[2]; // sprintf(buf1,"%d",point[d_node]); // sprintf(buf2,"%d",point[curr_index]); @@ -490,8 +492,7 @@ // // wait(1); // robot.lcd_clear(); - - + bool check = dead_end_removal(point[d_node], point[curr_index]); char dir_diff;