Library for interfacing with the Parallax Ping))) sensor.

Dependencies:   FPointer

Revision:
4:ddffe9339bb1
Parent:
3:0c337c262d84
Child:
5:cbe07c09c64c
--- a/ping.h	Mon Jul 28 00:16:34 2014 +0000
+++ b/ping.h	Mon Jul 28 00:17:57 2014 +0000
@@ -63,7 +63,7 @@
          * @param time_us Time traveled in microseconds.
          * @return The distance traveled in centimeters.
          */
-        float getDistanceCm(uint32_t time_us) { return time_us * SPEED_OF_SOUND_CM_PER_US; }
+        static float getDistanceCm(uint32_t time_us) { return time_us * SPEED_OF_SOUND_CM_PER_US; }
         
         /**
          * Gets the distance sound can travel, in inches, for a given time in uS.
@@ -71,7 +71,7 @@
          * @param time_us Time traveled in microseconds.
          * @return The distance traveled in inches.
          */
-        float getDistanceIn(uint32_t time_us) { return time_us * SPEED_OF_SOUND_IN_PER_US; }
+        static float getDistanceIn(uint32_t time_us) { return time_us * SPEED_OF_SOUND_IN_PER_US; }
         
         /**
          * Attach a callback function that will be called when a valid reading is available.