You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey thank for your suggestion. volatile for interrupt handlers is something I haven't thought about so far, thanks for bringing it up.
Regarding the naming of 'msSinceLastAssign'. The thing that I wanted to avoid is that it would be seen as functionally equivalent to 'changed()' just with the added info when the last change happened.
This function just tracks the last assignment, whether the value actually changed or stayed the same.
I could drop the 'since' though, it may be clear enough without that.
Great idea, really cleans up event-loop code!
Was wondering if the following ideas might improve it a little?
volatile T
(for interrupt handlers)msSinceLastAssign
bymsLastChange
?(I guess my main use-case so far is just switch debouncing in software though.)
The text was updated successfully, but these errors were encountered: