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

Pin press/release seem swapped in the simulator #540

Closed
riknoll opened this issue Oct 21, 2016 · 6 comments
Closed

Pin press/release seem swapped in the simulator #540

riknoll opened this issue Oct 21, 2016 · 6 comments

Comments

@riknoll
Copy link
Member

riknoll commented Oct 21, 2016

For this program:

pin_input

If you press P0 in the simulator, nothing happens until the pin is released. Then, the released event fires before the pressed event (shows 1 and then 0).

@samelhusseini
Copy link
Contributor

Looking at this bug it seems the behaviour is slightly mismatched between the simulator and the microbit, however pressed is not equivalent to [press down] on either.
What should the resolution be here?

Currently:
onPinPressed = EVT_CLICK
onPinReleased = EVT_UP

We don't surface any blocks for EVT_DOWN. (which is what on pressed is assumed as in this context).

@samelhusseini
Copy link
Contributor

@pelikhan

@OwenBrotherwood
Copy link
Contributor

#997 may also be interesting.

@guillaumejenkins
Copy link
Contributor

This has become stale...
Here are the possible fixes

  • Do nothing; "Press" will continue to mean a full click, down -> up (current behavior)
  • Change "Press" to mean down
  • Change "Press" to mean down and also add a "Click" event that means down -> up

@abchatra @riknoll @MicrosoftSam

@samelhusseini
Copy link
Contributor

Do nothing. Revisit later.

@lock
Copy link

lock bot commented Sep 26, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants