Merge 31b8bc0777
into 5adeed52b0
This commit is contained in:
commit
5a04c78307
@ -98,6 +98,13 @@ void PID::SetTunings(double Kp, double Ki, double Kd)
|
|||||||
kd = (0 - kd);
|
kd = (0 - kd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ResetI() *******************************************************************
|
||||||
|
* Resets the build up integral term of the PID
|
||||||
|
******************************************************************************/
|
||||||
|
void PID::ResetI() {
|
||||||
|
ITerm = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* SetSampleTime(...) *********************************************************
|
/* SetSampleTime(...) *********************************************************
|
||||||
* sets the period, in Milliseconds, at which the calculation is performed
|
* sets the period, in Milliseconds, at which the calculation is performed
|
||||||
|
4
PID_v1.h
4
PID_v1.h
@ -35,6 +35,10 @@ class PID
|
|||||||
void SetTunings(double, double, // * While most users will set the tunings once in the
|
void SetTunings(double, double, // * While most users will set the tunings once in the
|
||||||
double); // constructor, this function gives the user the option
|
double); // constructor, this function gives the user the option
|
||||||
// of changing tunings during runtime for Adaptive control
|
// of changing tunings during runtime for Adaptive control
|
||||||
|
|
||||||
|
void ResetI(); // * Resets Integral term of PID: Useful especially for multicopters.
|
||||||
|
// * This allows to reset this term when the multicopter descends to
|
||||||
|
// * the ground and contionues the flight again later.
|
||||||
void SetControllerDirection(int); // * Sets the Direction, or "Action" of the controller. DIRECT
|
void SetControllerDirection(int); // * Sets the Direction, or "Action" of the controller. DIRECT
|
||||||
// means the output will increase when error is positive. REVERSE
|
// means the output will increase when error is positive. REVERSE
|
||||||
// means the opposite. it's very unlikely that this will be needed
|
// means the opposite. it's very unlikely that this will be needed
|
||||||
|
@ -16,6 +16,7 @@ SetMode KEYWORD2
|
|||||||
Compute KEYWORD2
|
Compute KEYWORD2
|
||||||
SetOutputLimits KEYWORD2
|
SetOutputLimits KEYWORD2
|
||||||
SetTunings KEYWORD2
|
SetTunings KEYWORD2
|
||||||
|
ResetI KEYWORD2
|
||||||
SetControllerDirection KEYWORD2
|
SetControllerDirection KEYWORD2
|
||||||
SetSampleTime KEYWORD2
|
SetSampleTime KEYWORD2
|
||||||
GetKp KEYWORD2
|
GetKp KEYWORD2
|
||||||
|
Loading…
Reference in New Issue
Block a user