8000 Condition update for mode change from manual to auto. · robot0102/Arduino-PID-Library@21b19e7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 21b19e7

Browse files
authored
Condition update for mode change from manual to auto.
Minor update on the condition of initialization when changing mode. To only detect mode change from manual to auto.
1 parent fb095d8 commit 21b19e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

PID_v1.cpp

Lines changed: 1 addition & 1 deletion
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)
0