MCPcopy Create free account
hub / github.com/br3ttb/Arduino-PID-Library / SetMode

Method SetMode

PID_v1.cpp:175–183  ·  view source on GitHub ↗

SetMode(...)**************************************************************** * Allows the controller Mode to be set to manual (0) or Automatic (non-zero) * when the transition from manual to auto occurs, the controller is * automatically initialized ******************************************************************************/

Source from the content-addressed store, hash-verified

173 * automatically initialized
174 ******************************************************************************/
175void PID::SetMode(int Mode)
176{
177 bool newAuto = (Mode == AUTOMATIC);
178 if(newAuto && !inAuto)
179 { /*we just went from manual to auto*/
180 PID::Initialize();
181 }
182 inAuto = newAuto;
183}
184
185/* Initialize()****************************************************************
186 * does all the things that need to happen to ensure a bumpless transfer

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected