Refactoring and other updates

Dependencies:   BLE_API mbed nRF51822

Fork of nRF51822_SimpleChat by Cristi Stoican

PIDController.hpp

Committer:
carbune92
Date:
2017-05-10
Revision:
7:806b08205b25
Parent:
3:b6e4e5529a52

File content as of revision 7:806b08205b25:

#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