Pipeline Technology Centre / Mbed 2 deprecated PTCSpeed_MBED1

Dependencies:   mbed mbed-rtos

Revision:
1:b8f9693ae04f
Parent:
0:efdae9d24ee1
diff -r efdae9d24ee1 -r b8f9693ae04f UserInput.cpp
--- a/UserInput.cpp	Wed Jul 22 13:12:14 2015 +0000
+++ b/UserInput.cpp	Wed Jul 22 13:22:05 2015 +0000
@@ -7,7 +7,7 @@
 
 LocalFileSystem local("local");
 
-char company [100], pipe [100];
+char company [100], pipe [100],distance[100];
 //noOfSensor: is the number of sensors of the former
 //distance: is the distance between the sensors in 'mm'
 //S: straiting
@@ -52,9 +52,12 @@
     }else {
         for(int i = 0; i < 3; i++){
             pc.printf("inside");
-            distanceB = atoi (fgets (p2File).c_str());
+            char input[256];
+              gets( input);
+              distanceB = atoi(input);
+        //    distanceB = atoi (fgets (p2File).c_str());
         }
-        distanceB = atoi (fgets (p2File));
+      //  distanceB = atoi (fgets (p2File));
         pc.printf ("%i\n", distanceB);
         fclose (p2File);
     }