LRT13  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator
ProfiledPID.h
1 #ifndef PROFILED_PID_H_
2 #define PROFILED_PID_H_
3 
4 #include "PID.h"
5 #include "MotionProfile.h"
6 #include "Timer.h"
7 
8 class ProfiledPID : public PID
9 {
10 public:
11  ProfiledPID(MotionProfile *profile, double p_gain, double i_gain, double d_gain, double ff_gain = 1.0,
12  double i_decay = 0.5, bool feedforward = true);
13 
14  ProfiledPID(MotionProfile *profile);
15  virtual ~ProfiledPID();
16 
22  virtual double update(double dt);
23 
28  virtual void setSetpoint(double setpoint);
29 
30  void setMotionProfile(MotionProfile *profile);
31 
32 private:
33  double m_setpoint;
34  MotionProfile *m_profile;
35  Timer m_timer;
36 };
37 #endif