Kenji Arai / SoftSerial_IR

Dependents:   TestVirtualisation Bf_SoftSerial_IR

Revision:
13:2b5649a1278a
Parent:
12:79d63607bbb1
Child:
14:dc766032cdd6
--- a/SoftSerial_Ticker_IR.h	Mon Dec 17 03:38:12 2018 +0000
+++ b/SoftSerial_Ticker_IR.h	Thu Dec 20 00:43:12 2018 +0000
@@ -1,4 +1,8 @@
-//A modified version of the regular ticker/timeout libraries to allow us to do timeout without losing accuracy
+// Apply for Infrared LED and IR-Detector
+//      Modified by JH1PJL Dec. 19th, 2018
+
+// A modified version of the regular ticker/timeout libraries 
+//  to allow us to do timeout without losing accuracy
 
 #ifndef FLEXTICKERIR_H
 #define FLEXTICKERIR_H
@@ -22,8 +26,8 @@
         insert(event.timestamp + delay);
     }
     
-    void prime(void) {
-        event.timestamp = us_ticker_read();
+    void prime(uint32_t offset) {
+        event.timestamp = us_ticker_read() - offset;
     }
  
 protected: