ROS_FINGER

Fork of PID by LDSC_Robotics_TAs

PID.h

Committer:
adam_z
Date:
2016-04-22
Revision:
1:4df4895863cd
Parent:
0:7f9b4ca968ae

File content as of revision 1:4df4895863cd:

#ifndef PID_H
#define PID_H

#include "mbed.h"

class PID{
    public:

        PID(float setKp, float setKi, float setKd, float setSampletime);       
        void SetOutputLimits(float setoutputLimits_H, float setoutputLimits_L);
        void SetInputLimits(float setinputLimits_H, float setinputLimits_L);
        void Compute(float setreference, float setfeedbackvalue); 
        void PID::EnableAntiWindUp(float Ka_); 
        
        float Kp;
        float Ki;
        float Kd;
        float Ka;
 
        float error[3];
        float output;
        float reference;

        

        
        float sampletime;
        
        

    private:
    
        bool Outputlimit_bool;
        bool Inputlimit_bool;
        bool AntiWindUp_bool;
        
        float outputLimits_H;
        float outputLimits_L;
        float inputLimits_H;
        float inputLimits_L;
        
        float feedbackvalue;
 //       Ticker PID_timer;

};

#endif /* PID_H*/