Pipeline Technology Centre / Mbed 2 deprecated ConsolTest

Dependencies:   mbed

Dependents:   TabbedGUIMbed

Revision:
36:a2d20d5e5e19
Parent:
27:f3ca0269515f
Child:
40:23008d8111d5
--- a/Distance.cpp	Wed Jul 08 07:11:31 2015 +0000
+++ b/Distance.cpp	Wed Jul 08 08:38:37 2015 +0000
@@ -4,9 +4,9 @@
 
 float radius;
 int number_sensors;
-float distance;
+float distance_out;
 
-float Distance(){
+float distance(){
         pc.printf("Ready to Read.\n Enter the Radius\n");
         while (1){
                 if (pc.readable()){
@@ -15,10 +15,10 @@
                     pc.printf("Enter the number of sensors\n");
                     pc.scanf("%d", &number_sensors);
                     pc.printf("The number of sensors have been resived\n ");
-                    distance = (2*radius*3.14159)/number_sensors;
+                    distance_out = (2*radius*3.14159)/number_sensors;
                     break;
                     }
             }
         pc.printf("The distance has be calulated and is "); 
-        return(distance);//returns the distance in as a float 
+        return(distance_out);//returns the distance in as a float 
 }
\ No newline at end of file