We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi @dastels, didn't have a chance to review this before today. Just a couple of comments;
Adafruit_CircuitPython_Debouncer/adafruit_debouncer.py
Line 71 in c7a4a8e
Why check for interval is None in the constructor if it already has a default value? I think self._interval = interval would be sufficient.
interval is None
self._interval = interval
Do
from micropython import const ... _DEBOUNCED_STATE = const(0x01) _UNSTABLE_STATE = const(0x02) _CHANGED_STATE = const(0x04)
This will, at compile time, substitute the integer values for the names. This speeds up the code and makes it smaller. The underscored names will actually disappear from the compiled code because they aren't exeternally available. See http://docs.micropython.org/en/latest/reference/speed_python.html#the-const-declaration and http://docs.micropython.org/en/latest/library/micropython.html?highlight=const#micropython.const
The text was updated successfully, but these errors were encountered:
Fixed by #6.
Sorry, something went wrong.
No branches or pull requests
Hi @dastels, didn't have a chance to review this before today. Just a couple of comments;
Adafruit_CircuitPython_Debouncer/adafruit_debouncer.py
Line 71 in c7a4a8e
Why check for
interval is None
in the constructor if it already has a default value? I thinkself._interval = interval
would be sufficient.Do
This will, at compile time, substitute the integer values for the names. This speeds up the code and makes it smaller. The underscored names will actually disappear from the compiled code because they aren't exeternally available. See
http://docs.micropython.org/en/latest/reference/speed_python.html#the-const-declaration
and
http://docs.micropython.org/en/latest/library/micropython.html?highlight=const#micropython.const
The text was updated successfully, but these errors were encountered: