1 sensor using RTOS Timer, another 2 over RTOS Semaphore

Dependents:   Autonomous_quadcopter

Fork of HCSR04 by Antoniolinux B.

Revision:
11:49a0feca5d71
Parent:
8:0a10bacaf501
Child:
12:6f6469b2f016
--- a/hcsr04.h	Sun Mar 04 11:04:09 2018 +0000
+++ b/hcsr04.h	Sun Mar 04 15:17:12 2018 +0000
@@ -39,7 +39,7 @@
   public:
     HCSR04(PinName t1, PinName e1, PinName t2, PinName e2);
 
-    int getDistan1();
+    float getDistan1();
     uint16_t getDistan2();
  
     private:
@@ -62,7 +62,7 @@
         RtosTimer *threadUpdateTimer1;
         RtosTimer *threadUpdateTimer2;
         
-        int distan1;
+        float distan1;
         uint32_t distan2;
 };