Skip to content

Commit 5adeed5

Browse files
authored
Merge pull request #56 from zcx119/patch-1
Condition update for mode change from manual to auto.
2 parents fb095d8 + 21b19e7 commit 5adeed5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PID_v1.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ void PID::SetOutputLimits(double Min, double Max)
146146
void PID::SetMode(int Mode)
147147
{
148148
bool newAuto = (Mode == AUTOMATIC);
149-
if(newAuto == !inAuto)
149+
if(newAuto && !inAuto)
150150
{ /*we just went from manual to auto*/
151151
PID::Initialize();
152152
}

0 commit comments

Comments
 (0)