Refactoring and other updates
Dependencies: BLE_API mbed nRF51822
Fork of nRF51822_SimpleChat by
Diff: PIDController.hpp
- Revision:
- 3:b6e4e5529a52
diff -r 3acccd193d5d -r b6e4e5529a52 PIDController.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PIDController.hpp Mon May 08 13:05:45 2017 +0000 @@ -0,0 +1,32 @@ +#ifndef PIDCONTROLLER_H +#define PIDCONTROLLER_H + +#include "Controller.hpp" + +#define TE 0.1 +#define dif(a,b) (a-b) + +class PIDController : public Controller { + + private: + float kp; + float ti; + float td; + + public: + + virtual void updateParams(ControllerParams&); + virtual void calculateCmd(void); + virtual ~PIDController(); + + void setKp(float); + float getKp() const; + + void setTi(float); + float getTi() const; + + void setTd(float); + float getTd() const; +}; + +#endif