microsoft / microsoft/pxt-microbit
Simulator: Accelerometer negative values do not go to -1023 when simulating external hardware
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 804
- Forks
- 721
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 2
Description
Describe the bug
Using accelerometer 'x' axis values in a Program. If you roll over the simulator, you get a maximum value of 1023 on the right of the simulator but only ~-831 on the left.
To Reproduce
Steps to reproduce the behavior:
- Use acceleromater in MakeCode Program
- Roll over simulator
Expected behavior
I would expect values to range between -1023 to 1023 on the simulator.
Desktop (please complete the following information):
- OS: [e.g. iOS] Windows 10
- Browser [e.g. chrome, safari] Edge
- Version [e.g. 22] 91
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no source file, test, or entry point. Start by locating the simulator's accelerometer handling and reproduce the rollover case; done means the simulated x-axis reaches approximately -1023 to 1023.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- embedded-iot, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100