microsoft / microsoft/pxt-microbit

Simulator: Accelerometer negative values do not go to -1023 when simulating external hardware

Open
#4,253 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P2 Simulator
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.

https://user-images.githubusercontent.com/31242877/123605566-e2fa2080-d7f3-11eb-839e-db53e6692cd7.mp4

To Reproduce
Steps to reproduce the behavior:

  1. Use acceleromater in MakeCode Program
  2. 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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.