This commit is contained in:
zkhan666 2022-11-16 15:55:56 -05:00 committed by GitHub
commit 0e71dd0866
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,12 +17,12 @@ class PID
#define P_ON_E 1
//commonly used functions **************************************************************************
PID(double*, double*, double*, // * constructor. links the PID to the Input, Output, and
double, double, double, int, int);// Setpoint. Initial tuning parameters are also set here.
PID(double*, double*, double*, double*, // * constructor. links the PID to the Input, Output, and
double, double, double, double, int, int);// Setpoint. Initial tuning parameters are also set here.
// (overload for specifying proportional mode)
PID(double*, double*, double*, // * constructor. links the PID to the Input, Output, and
double, double, double, int); // Setpoint. Initial tuning parameters are also set here
PID(double*, double*, double*, double*, // * constructor. links the PID to the Input, Output, and
double, double, double, double, int); // Setpoint. Initial tuning parameters are also set here
void SetMode(int Mode); // * sets PID to either Manual (0) or Auto (non-0)
@ -39,9 +39,9 @@ class PID
//available but not commonly used functions ********************************************************
void SetTunings(double, double, // * While most users will set the tunings once in the
double); // constructor, this function gives the user the option
double, double); // constructor, this function gives the user the option
// of changing tunings during runtime for Adaptive control
void SetTunings(double, double, // * overload for specifying proportional mode
void SetTunings(double, double, double // * overload for specifying proportional mode
double, int);
void SetControllerDirection(int); // * Sets the Direction, or "Action" of the controller. DIRECT
@ -77,10 +77,10 @@ class PID
double *myInput;// * Pointers to the Input, Output, and Setpoint variables
double *myOutput; // This creates a hard link between the variables and the
double *mySetpoint; // PID, freeing the user from having to constantly tell us
// what these values are. with pointers we'll just know.
double *myInput2; // what these values are. with pointers we'll just know.
unsigned long lastTime;
double outputSum, lastInput;
double outputSum, lastInput, lastInput2;
unsigned long SampleTime;
double outMin, outMax;