ROS_FINGER

Fork of PID by LDSC_Robotics_TAs

PID.h

Committer:
noname001
Date:
2018-08-22
Revision:
2:d1b781222f88
Parent:
1:4df4895863cd

File content as of revision 2:d1b781222f88:

#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*/