Interface to a standard tarco sensor. Measure the periode and the cal the speed

Revision:
4:35024179a736
Parent:
3:6d3f2034e5f1
Child:
5:451dd1189b0f
--- a/Tarco.h	Thu Nov 07 12:02:47 2013 +0000
+++ b/Tarco.h	Tue Nov 19 09:19:01 2013 +0000
@@ -8,18 +8,25 @@
 
 private:
     InterruptIn _tarcosensor;
-    void click();
-    uint32_t PrevPulses;
+    void click(); //Measure the tarco from a one puls /rotation source
+    void fsk();   //measure tarco from a fsk source
+    int p1,p2;
     int AdvPeriode;
-    Timer t;
+    Timer t; //time for one rotation
+    Timer fsktime; //time between fsk pulse
+    int pulsvariation, lastpuls, count;
+    char tarcomode;
 public:
     // ********************************************************************************
-    // * Constructor
-    // *
-    // * @param flowsignal   The pin which is connected to the flowsensor.
+    // Constructor
+    // @param flowsignal   The pin which is connected to the flowsensor.
+    //
+    // change the mode of the tarco
+    // 0: Standard One click/rotation
+    // 1: FSK modulated 
     // ********************************************************************************
-    Tarco(PinName tarcosignal);
-
+    Tarco(PinName tarcosignal,char mode);
+    
     // ********************************************************************************
     // gives the tarco value in hz
     // ********************************************************************************