Project

General

Profile

Revision 71780e9c

ID71780e9c3f71dc76792785ada940cacd83cda58e

Added by Priya almost 6 years ago

tested pid_control and fixed it. added the test file for future reference

View differences:

control/pid_control.h
4 4
class PID_control
5 5
{
6 6
  public:
7
    PID_control(int p_term, int d_term, int i_term, float goal); 
8
    PID_control(int p_term, int d_term, int i_term); 
7
    PID_control(float p_term, float d_term, float i_term, float goal); 
8
    PID_control(float p_term, float d_term, float i_term); 
9 9

  
10 10
    void change_goal(float goal);
11 11

  
12 12
    float pid(float input);
13 13

  
14 14
  private:
15
    int k_p;
16
    int k_i;
17
    int k_d;
15
    float k_p;
16
    float k_i;
17
    float k_d;
18 18
    
19 19
    float set_config;
20 20
    float error;

Also available in: Unified diff