microsoft / microsoft/pxt-microbit

on touched, on released, unexpected behaviour

Open
#963 24 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P2
Dominant language
TypeScript
Stars
804
Forks
721
Avg merge
2d 9h
Merged PRs (30d)
2

Description

Describe the bug
Using on touched and on released doesn't seem to operate with simple behaviour, as I would expect.

To Reproduce
Use this code for a dead-man's-handle (train driver) in the makecode simulator

screen shot 2018-07-24 at 17 24 14

Expected behaviour
I expect when I touch P0 to see a smiley to let me know the train is safe to drive, and when I release my touch on P0 it scrolls 'STOP THE TRAIN'

Desktop (please complete the following information):
Mac OSX 10.10.5 Google Chrome

Additional context
I am porting some simple scripts from Touch Develop in to makecode for one of our content partners. This was a lovely and simple example in Touch Develop, but it seems really hard to get it to work reliably in MakeCode.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the P0 touch/release example in the MakeCode simulator described in the issue, using the screenshot as the available reproduction. Compare the observed event behavior with the expected smiley-on-touch and “STOP THE TRAIN” on-release sequence; done means those transitions are reliable.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.