Skip to content

Conversation

@nekowokaburu
Copy link

Thanks for the lib! I noticed that the Relay version has some bugs:

  • _lastPulseTime was uninitialized, I set it to millis() to catch up quicker
  • the _lastPulseTime computation in the while loop can go wrong on two unsigned values, especially with one uninitialized ;)

I also moved the millis() check out of the loop as I'd rather have a more robust PID that can always catch up to the millis() value in the while loop than the small speed improvement, if any. I am running an espresso machine with this and would hate to see it blow up ;)

ademuri added a commit to ademuri/AutoPID that referenced this pull request Oct 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant