quadcopter cufe
/
2006_Theta_Control_yaw
Quadcopter Attitude Control(Yaw-Pitch-Roll)
Diff: Counter.h
- Revision:
- 0:e63996fd7d3e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Counter.h Fri Jul 03 11:16:02 2015 +0000 @@ -0,0 +1,24 @@ +#ifndef Counter_H +#define Counter_H +#include "mbed.h" +class Counter { + +public: +Counter(PinName channel,float inc_enc_constant); +void increment(); +int read_count(); +float read_rpm(); +void reset(); +float medianFilter(int Window_Size); +void swap(float *x,float *y); + +private: + long float delta_time; + float rpm; + InterruptIn _interrupt; + Timer t; + volatile int _count; + float _inc_enc_constant; +}; + +#endif /* Counter_H */