James Heavey / Mbed 2 deprecated 3875_DISSERTATION

Dependencies:   mbed 3875_Individualproject

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;