.

Dependents:  

Revision:
0:d784b08f51ff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DiffCounter.h	Fri Sep 28 12:42:32 2018 +0000
@@ -0,0 +1,29 @@
+#ifndef DIFFCOUNTER_H_
+#define DIFFCOUNTER_H_
+
+class DiffCounter
+{
+public:
+
+    DiffCounter(float T, float Ts);
+    
+    float operator()(short inc) {
+        return doStep(inc);
+    }
+    
+    virtual     ~DiffCounter();
+    
+    void        reset(float initValue, short inc);
+    float       doStep(short inc);
+
+private:
+
+    double b;
+    double a;
+    short incPast;
+    double vel;
+    double inc2rad;
+
+};
+
+#endif /* DIFFCOUNTER_H_ */
\ No newline at end of file