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.
Diff: UserInput.cpp
- 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); }