-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add LED.set() function #70
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
Conversation
pyb/pyb.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I find this much clearer to read:
self.f.write(b"{}".format(max(0, min(255, v)))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, but it involves 2 function calls. And the original is almost plain English anyway ;-).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I revert it to what I had before?
@Ivoah : Sorry, I'm losing track of things ;-). I thought @SpotlightKid's comment was about a file already in a master, not about a pull request.
The problem with this patch is that this module is intended to emulate pyboard's "pyb" module. And pyb.LED class of pyboard doesn't have .set() method.
Well, I could always make a pull request to the main pyb module too ;)
No description provided.