Microscopic

This commit is contained in:
clplaneguy 2019-04-04 19:11:57 -05:00 committed by GitHub
parent a2764c9461
commit f2ebd6e9cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,7 @@
#include <PID_v1.h>
/*Constructor (...)*********************************************************
* The parameters specified here are those for for which we can't set up
* The parameters specified here are those for which we can't set up
* reliable defaults, so we need to have the user set them.
***************************************************************************/
PID2::PID2(double* Input, double* Output, double* Setpoint,
@ -26,9 +26,9 @@ PID2::PID2(double* Input, double* Output, double* Setpoint,
inAuto = false;
PID::SetOutputLimits(0, 255); //default output limit corresponds to
//the arduino pwm limits
//the arduino pwm limits
SampleTime = 100; //default Controller Sample Time is 0.1 seconds
SampleTime = 100; //default Controller Sample Time is 0.1 seconds
PID::SetControllerDirection(ControllerDirection);
PID::SetTunings(Kp, Ki, Kd, POn);
@ -75,7 +75,7 @@ bool PID2::Compute()
else if(outputSum < outMin) outputSum= outMin;
/*Add Proportional on Error, if P_ON_E is specified*/
double output;
double output;
if(pOnE) output = kp * error;
else output = 0;