.

Dependents:  

DiffCounter.h

Committer:
altb
Date:
2019-02-25
Revision:
11:78e723ede0c6
Parent:
0:d784b08f51ff

File content as of revision 11:78e723ede0c6:

#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_ */