Skip to content
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

Fix button down detection #6

Merged
merged 1 commit into from
Mar 2, 2012
Merged

Fix button down detection #6

merged 1 commit into from
Mar 2, 2012

Conversation

richkzad
Copy link
Contributor

I'm guessing du.ino was changed recently, because the button.js state detection logic was wrong in two different ways:

  • m[1] is actually a 2 character string, so comparing it to '0' and '1' will always fail
  • it had the values for up and down reversed.

It makes sense that 1 be down and 0 be up, but I'm not sure where you want the fix for the two character value.

I'm guessing du.ino was changed recently, because this button detection logic was wrong in two different ways:
- m[1] is actually a 2 character string, so comparing it to '0' and '1' will always fail
- it had the values for up and down reversed.

It makes sense that 1 be down and 0 be up, but I'm not sure where you want the fix for the two character value.
@ecto
Copy link
Owner

ecto commented Mar 2, 2012

Hey man, good catch. I waited to push the C changes to NPM because I thought something like this would come up and I didn't have time to test everything when I merged. I'll add you as a contributor 👍

ecto pushed a commit that referenced this pull request Mar 2, 2012
[minor] Fix button down detection
@ecto ecto merged commit dc7e870 into ecto:master Mar 2, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants