robot

Dependencies:   FastPWM3 mbed

Revision:
137:54c47ef47bbb
Parent:
92:a9dac72d8cac
Child:
138:7ff70cef8db3
--- a/PwmIn/PwmIn.cpp	Mon May 01 10:40:39 2017 +0000
+++ b/PwmIn/PwmIn.cpp	Mon May 01 11:21:42 2017 +0000
@@ -27,7 +27,10 @@
 
 void PwmIn::handle_rise()
 {
-    enabled = true;
+    if (!enabled) {
+        enabled = true;
+        usecs = usecs_min;
+    }
     risen = true;
     
     timer.stop();