Template for group 4

Dependencies:   mbed

Fork of RT2_P3_students by RT2_P3_students

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers DiffCounter.h Source File

DiffCounter.h

00001 #ifndef DIFFCOUNTER_H_
00002 #define DIFFCOUNTER_H_
00003 
00004 class DiffCounter
00005 {
00006 public:
00007 
00008     DiffCounter(float T, float Ts);
00009     
00010     float operator()(short inc) {
00011         return doStep(inc);
00012     }
00013     
00014     virtual     ~DiffCounter();
00015     
00016     void        reset(float initValue, short inc);
00017     float       doStep(short inc);
00018 
00019 private:
00020 
00021     double b;
00022     double a;
00023     short incPast;
00024     double vel;
00025     double inc2rad;
00026 
00027 };
00028 
00029 #endif /* DIFFCOUNTER_H_ */