Skip to content

Commit

Permalink
Merge pull request #56 from zcx119/patch-1
Browse files Browse the repository at this point in the history
Condition update for mode change from manual to auto.
  • Loading branch information
br3ttb authored Feb 15, 2017
2 parents fb095d8 + 21b19e7 commit 5adeed5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion PID_v1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ void PID::SetOutputLimits(double Min, double Max)
void PID::SetMode(int Mode)
{
bool newAuto = (Mode == AUTOMATIC);
if(newAuto == !inAuto)
if(newAuto && !inAuto)
{ /*we just went from manual to auto*/
PID::Initialize();
}
Expand Down

0 comments on commit 5adeed5

Please sign in to comment.