Closed
Description
Describe the bug
When used without arguments, reset_angle()
should reset the angle to the absolute marker.
But in some cases while holding, it jumps to zero.
To reproduce
from pybricks.pupdevices import Motor
from pybricks.parameters import Port
from pybricks.tools import wait
motor = Motor(Port.B)
motor.run_target(500, 90)
motor.reset_angle()
wait(1000)
Things do seem to work correctly when giving an angle argument or when using a different stop mode.
Expected behavior
With no arguments given, the angle should do this for positive angles:
motor.reset_angle(motor.angle() % 360)