Skip to content

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

Closed
wants to merge 3 commits into from
Closed

Conversation

rudacs
Copy link
Contributor

@rudacs rudacs commented Oct 11, 2017

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

var state = {
isAnode: opts.isAnode,
inverted: opts.inverted,

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.

Copy link
Contributor Author

@rudacs rudacs Oct 11, 2017

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.

Copy link
Collaborator

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.

@stale
Copy link

stale bot commented Jul 29, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added stale and removed stale labels Jul 29, 2019
@dtex
Copy link
Collaborator

dtex commented Jul 29, 2019

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?

@stale
Copy link

stale bot commented Jun 11, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale label Jun 11, 2021
@stale stale bot closed this Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants