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.
This commit is contained in:
parent
fb095d8cfc
commit
21b19e7ab0
@ -146,7 +146,7 @@ void PID::SetOutputLimits(double Min, double Max)
|
|||||||
void PID::SetMode(int Mode)
|
void PID::SetMode(int Mode)
|
||||||
{
|
{
|
||||||
bool newAuto = (Mode == AUTOMATIC);
|
bool newAuto = (Mode == AUTOMATIC);
|
||||||
if(newAuto == !inAuto)
|
if(newAuto && !inAuto)
|
||||||
{ /*we just went from manual to auto*/
|
{ /*we just went from manual to auto*/
|
||||||
PID::Initialize();
|
PID::Initialize();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user