-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
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
BlynkTimer Broken on Low Memory Ports #5
Comments
BradenM
added a commit
to BradenM/lib-python
that referenced
this issue
Jun 20, 2019
On low memory ports MICROPY_PY_FUNCTION_ATTRS is disabled, leading BlynkTimer to raise an AttributeError when trying to get a name for a new timer. This fixes it by naming each timer 'X_timer' (where X is the # of timer) if the __name__ attribute does not exist. Fixes blynkkk#5
Added one comment to your pull request. And Thanks for your investigation. |
antohaUa
pushed a commit
that referenced
this issue
Jun 20, 2019
* fix(timer): BlynkTimer Broken on Low Memory Ports On low memory ports MICROPY_PY_FUNCTION_ATTRS is disabled, leading BlynkTimer to raise an AttributeError when trying to get a name for a new timer. This fixes it by naming each timer 'X_timer' (where X is the # of timer) if the __name__ attribute does not exist. Fixes #5 * docs(timer): Added note about Low Memory ports * feat(timer): Cleanup Code, handle all cases * docs(timer): Added some docstrings for clarification
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected Behavior
Registering a Timer via
register
decorator should work on devices with low memory.Actual Behavior
An
AttributeError
is raised, complaining that a function object has no attribute 'func', as this seems to be the current fallback if a__name__
attribute cannot be found. This completely breaks BlynkTimer on low memory ports.Steps to Reproduce the Problem
Specifications
The text was updated successfully, but these errors were encountered: