Template for group 4

Dependencies:   mbed

Fork of RT2_P3_students by RT2_P3_students

DiffCounter.h

Committer:
altb
Date:
2018-04-27
Revision:
10:85840c065e00
Parent:
5:72982ede2ff6

File content as of revision 10:85840c065e00:

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