Use enums instead of defines

This commit is contained in:
Dan Rice
2014-09-02 13:54:33 -04:00
parent fb095d8cfc
commit be0c8e1a5e
5 changed files with 18 additions and 19 deletions

View File

@ -22,7 +22,7 @@ double aggKp=4, aggKi=0.2, aggKd=1;
double consKp=1, consKi=0.05, consKd=0.25;
//Specify the links and initial tuning parameters
PID myPID(&Input, &Output, &Setpoint, consKp, consKi, consKd, DIRECT);
PID myPID(&Input, &Output, &Setpoint, consKp, consKi, consKd, PID::DIRECT);
void setup()
{
@ -31,7 +31,7 @@ void setup()
Setpoint = 100;
//turn the PID on
myPID.SetMode(AUTOMATIC);
myPID.SetMode(PID::AUTOMATIC);
}
void loop()