02/07/15

Dependencies:   mbed

Dependents:   TabbedGUIMbed

Revision:
69:74bffa1d3f7f
Parent:
68:c6399471ea49
Child:
70:168d67695a65
--- a/Calculate.cpp	Wed Aug 26 16:08:09 2015 +0000
+++ b/Calculate.cpp	Thu Aug 27 14:32:20 2015 +0000
@@ -2,7 +2,6 @@
 #include <time.h>
 #include <string>
 #include <iostream>
-#include "Distance.h"
 #include "Data.h"
 
 //*************defining methods used in this method
@@ -87,6 +86,7 @@
                                      avgSpeeds[i] = avgspeed;
                                      totalTimes[i] = avgtime;
                                        i++;                           //move onto next sensor
+                                       
              } 
         }
         
@@ -94,6 +94,7 @@
         reset(distance, NoOfPins);    
 }
 }
+
 void reset(int distance, int NoOfPins)
 {
     while ( sensor[0]){
@@ -101,7 +102,13 @@
         }
         wait_ms(50);
         bendCounter++;
-        //resets      
+        //resets c# display to all 0's
+         pc.printf("\n" );
+         pc.printf("\n" );
+         pc.printf("\n" );
+         pc.printf("\n" );
+         pc.printf("%d\n", 0);
+        //resets arrays to all 0     
          std::fill_n(times, 20 , 0);        //empty array of times so averaging works
          std::fill_n(speeds, 20 , 0);
          std::fill_n(avgSpeeds, 20 , 0);