microsoft / pxt-microbit

A Blocks / JavaScript code editor for the micro:bit built on Microsoft MakeCode
https://makecode.microbit.org
Other
718 stars 589 forks source link

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

Open microbit-mark opened 3 years ago

microbit-mark commented 3 years ago

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):

microbit-mark commented 3 years ago

In full screen mode you get a full 1023 value, wherever you hold the cursor. Screen Recording 2021-07-01 at 03 53 56 pm

Moving the cursor off the micro:bit reduces the value back to 0

Reproduces in Chrome and Edge

microbit-mark commented 3 years ago

https://support.microbit.org/a/tickets/46830

I think this is a report of the same issue... It's even more confusing for people when you use tilt left. It's almost impossible to trigger a tilt left on the simulator.

Screen Recording 2021-07-28 at 01 51 35 pm

@abchatra this seems to only reproduce when the simulator is extended eg sound/servo