Beta: Logo is always pressed when touch mode is resistive
Describe the bug Logo is always pressed when touch mode is resistive
To Reproduce Steps to reproduce the behavior:
- Go to 'https://makecode.microbit.org/beta'
- Download script as below
- Press A
- 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 is this hardware only issue? Does it still repro?
It still repros, but I'm not sure how or if this should work, so I have raised the question for CODAL.
This is an issue in CODAL.
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