2nd try
DiffCounter.h@0:72b60c5271cc, 2019-03-07 (annotated)
- Committer:
- altb2
- Date:
- Thu Mar 07 07:03:44 2019 +0000
- Revision:
- 0:72b60c5271cc
System running
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
altb2 | 0:72b60c5271cc | 1 | #ifndef DIFFCOUNTER_H_ |
altb2 | 0:72b60c5271cc | 2 | #define DIFFCOUNTER_H_ |
altb2 | 0:72b60c5271cc | 3 | |
altb2 | 0:72b60c5271cc | 4 | class DiffCounter |
altb2 | 0:72b60c5271cc | 5 | { |
altb2 | 0:72b60c5271cc | 6 | public: |
altb2 | 0:72b60c5271cc | 7 | |
altb2 | 0:72b60c5271cc | 8 | DiffCounter(float T, float Ts); |
altb2 | 0:72b60c5271cc | 9 | |
altb2 | 0:72b60c5271cc | 10 | float operator()(short inc) { |
altb2 | 0:72b60c5271cc | 11 | return doStep(inc); |
altb2 | 0:72b60c5271cc | 12 | } |
altb2 | 0:72b60c5271cc | 13 | |
altb2 | 0:72b60c5271cc | 14 | virtual ~DiffCounter(); |
altb2 | 0:72b60c5271cc | 15 | |
altb2 | 0:72b60c5271cc | 16 | void reset(float initValue, short inc); |
altb2 | 0:72b60c5271cc | 17 | float doStep(short inc); |
altb2 | 0:72b60c5271cc | 18 | |
altb2 | 0:72b60c5271cc | 19 | private: |
altb2 | 0:72b60c5271cc | 20 | |
altb2 | 0:72b60c5271cc | 21 | double b; |
altb2 | 0:72b60c5271cc | 22 | double a; |
altb2 | 0:72b60c5271cc | 23 | short incPast; |
altb2 | 0:72b60c5271cc | 24 | double vel; |
altb2 | 0:72b60c5271cc | 25 | double inc2rad; |
altb2 | 0:72b60c5271cc | 26 | |
altb2 | 0:72b60c5271cc | 27 | }; |
altb2 | 0:72b60c5271cc | 28 | |
altb2 | 0:72b60c5271cc | 29 | #endif /* DIFFCOUNTER_H_ */ |