-
Notifications
You must be signed in to change notification settings - Fork 1.8k
LED.isAnode does not work for OUTPUT mode #1398
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
var state = { | ||
isAnode: opts.isAnode, | ||
inverted: opts.inverted, |
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.
We should not use "inverted" because it is ambiguous. An LED is either common anode or common cathode. There is no such state as "inverted" because there is no default state to invert.
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.
So will it continue to be isAnode?
Because the inverted is not hardware and yes logical.
The led lights when the pin is negative and goes off when the pin is positive.
This to me is reversed in the logical sense.
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.
As I understand it "common anode" and "common cathode" are RGB LED properties. This change is specifically for single color LED's. So I would think @soundanalogous's suggestion of "syncdrive" (from #1026) would be the appropriate property here.
I also propose that instead of adding this condition to every controller we add a "syncdrive" device type that has a new getValue()
or maybe just value()
method.
Lastly, there is a new property on the io object (in firmata at least) that allows us to know the resolution of pwm writes (i.e. 10-bit instead of 8-bit). We should leverage that here rather than assuming 8-bit.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
This is still an issue, but it's sat for a while. Perhaps we can settle on a label for the property at JSCONF this year? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
I fixed a problem in isAnode in the component of the LED that I just implemented in PWM mode.
In this item is discussed to change the name to invert (yet to be done).
#1026