PIDs and fun

Dependencies:   btbee m3pi_ng mbed FatFileSystemCpp

Revision:
11:ac6112ca954f
Parent:
10:fd4ae3946c7e
Child:
12:057471fb3616
--- a/main.cpp	Thu May 28 13:47:23 2015 +0000
+++ b/main.cpp	Thu May 28 14:29:54 2015 +0000
@@ -103,18 +103,6 @@
     double timer;
     btbee.printf("\n");
     btbee.printf("Now starting \n");
-    string message;
-    DIR *d;
-    struct dirent *p;
-   
-    d = opendir("/" FSNAME);
-    
-    FILE *fp = fopen( "/" FSNAME "/test results.txt", "w"); //file name
-    if ( fp == NULL )
-    {
-        m3pi.leds(1);
-    }
-    
     
     while (1) {
         
@@ -137,10 +125,6 @@
         current_pos_of_line = m3pi.line_position();        
         proportional = current_pos_of_line;
         
-        std::ostringstream ss;
-        ss << current_pos_of_line;
-        message = ss.str();
-        message.append("     ");
         
         // Compute the derivative
         derivative = current_pos_of_line - previous_pos_of_line;
@@ -174,12 +158,7 @@
         m3pi.right_motor(right);
         
         
-        ss << left;
-        message.append(ss.str());
-        message.append("     ");
-        ss << right;
-        message.append(ss.str());
-             
+           
         
     m3pi.calibrated_sensor(LapTest);
     
@@ -329,12 +308,8 @@
 //    timer = 0;
 //    LoopTime.reset();
 
-        printf("%s",message);
-        fprintf(fp,"\n");
-        message.clear();
         
     }
 
 
-    fclose(fp);
 }