fixed issue #3 and issue #4

-Changed Compute() to a bool from a void,  allowing the calling function
to know when the pid calculation has just been evaluated

-cleaned up the initialization code in the constructor
This commit is contained in:
Brett Beauregard
2012-10-04 20:47:12 -04:00
parent 169cdd0908
commit d4ce7050a5
3 changed files with 14 additions and 10 deletions

View File

@ -20,7 +20,7 @@ class PID
void SetMode(int Mode); // * sets PID to either Manual (0) or Auto (non-0)
void Compute(); // * performs the PID calculation. it should be
bool Compute(); // * performs the PID calculation. it should be
// called every time loop() cycles. ON/OFF and
// calculation frequency can be set using SetMode
// SetSampleTime respectively