2nd try
Diff: DiffCounter.h
- Revision:
- 0:72b60c5271cc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DiffCounter.h Thu Mar 07 07:03:44 2019 +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_ */