Merge pull request #56 from zcx119/patch-1
Condition update for mode change from manual to auto.
This commit is contained in:
commit
5adeed52b0
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user