pxt-microbit icon indicating copy to clipboard operation
pxt-microbit copied to clipboard

Beta: Logo is always pressed when touch mode is resistive

Open martinwork opened this issue 5 years ago • 4 comments

Describe the bug Logo is always pressed when touch mode is resistive

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://makecode.microbit.org/beta'
  2. Download script as below
  3. Press A
  4. See happy face on LEDs

Expected behavior Happy face only when logo touched.

micro:bit version (please complete the following information):

V2.0

Desktop (please complete the following information):

  • OS: [e.g. iOS] Windows 10
  • Browser [e.g. chrome, safari] Chrome
  • Version [e.g. 22] Version 86.0.4240.198 (Official Build) (64-bit)

Additional context

basic.forever(function () {
    if (input.logoIsPressed()) {
        basic.showIcon(IconNames.Happy)
    }
    basic.clearScreen()
})

input.onButtonPressed(Button.A, function () {
    pins.touchSetMode(TouchTarget.LOGO, TouchTargetMode.Resistive)
})

input.onButtonPressed(Button.B, function () {
    pins.touchSetMode(TouchTarget.LOGO, TouchTargetMode.Capacitive)
})

martinwork avatar Nov 17 '20 16:11 martinwork

@martinwork is this hardware only issue? Does it still repro?

abchatra avatar May 28 '21 17:05 abchatra

It still repros, but I'm not sure how or if this should work, so I have raised the question for CODAL.

martinwork avatar May 29 '21 12:05 martinwork

This is an issue in CODAL.

abchatra avatar Feb 24 '22 17:02 abchatra

We've looked into this in CODAL and the final solution will require a change in MakeCode. I can submit the change in a PR with the next CODAL tag, but in the meantime it'd be good to reopen this issue to be able to track it.

The change would look like this: https://github.com/microsoft/pxt-microbit/compare/master...microbit-carlos:pxt-microbit:logo-pin?expand=1

microbit-carlos avatar Mar 28 '24 11:03 microbit-carlos