view include/Pid.h @ 152:8f98b32d0e23 ClockSync

Last commit on this branch for a while. Overall not very succesful
author Giulio Moro <giuliomoro@yahoo.it>
date Mon, 05 Oct 2015 13:06:14 +0100
parents 134bff10e561
children
line wrap: on
line source
/*
 * Pid.h
 *
 *  Created on: 14 Sep 2015
 *      Author: giulio
 */

#ifndef PID_H_
#define PID_H_
#include <stdio.h>

class Pid{
private:
	float integralError;
	float pastError;
	float error;
	float differentialError;
	float output;
	float kp;
	float ki;
	float kd;
	float gain;
	float ts;
	int idleTimeout;
	int timeoutCount;
	void updateIntegralError();
	void updateDifferentialError();
public:
	Pid();
	float setError(float anError);
	void setIdleTimeout(int aIdleTimeout);
	float getOutput();
	void setProportionalGain(float proportionalGain);
	void setDerivativeGain(float derivativeGain);
	void setIntegralGain(float integralGain);
	void setGlobalGain(float globalGain);
	float getProportionalGain();
	float getDerivativeGain();
	float getIntegralGain();
	float getGlobalGain();
	float getIntegralError();
};



#endif /* PID_H_ */