Sharp GP2 familly distance sensor library

Dependents:   FRC_2018 0hackton_08_06_18 0hackton_08_06_18_publish Kenya_2019 ... more

Revision:
2:5e591a5b8edd
Parent:
1:956ee3b2eaa0
Child:
3:dcd04d9d0eb7
--- a/GP2A.h	Mon May 21 12:36:09 2018 +0000
+++ b/GP2A.h	Mon May 21 16:14:54 2018 +0000
@@ -80,14 +80,21 @@
      *
      * @return the distance in cm
      */
-    float getDistance (void);
+    double getDistance (void);
 
     /**
      * Return the voltage on GP2A output
      *
      * @return the voltage between 0 and 3.3V
      */
-    float getVoltage (void);
+    double getVoltage (void);
+    
+    /** 
+     * A short hand of getDistance
+     */
+    operator double();
+    
+    
 
 private :
     float m_dMin, m_dMax, m_slope;