[Feature] Don't reset drivebase when calling use_gyro(True)
successively
#1858
Labels
software: pybricks-micropython
Issues with Pybricks MicroPython firmware (or EV3 runtime)
topic: control
Issues involving control system algorithms
Is your feature request related to a problem? Please describe.
User @familynygood recently asked about an accuracy issue in their program, which contains functions such as:
Even though
Stop.HOLD
is used here as recommended, errors still accumulate.This is because
use_gyro
will reset the drive controllers. This was intentional, since the gyro and rotation sensors can report different values.Describe the solution you'd like
Calling
use_gyro(True)
and thenuse_gyro(True)
again isn't really intended to be used that way, but I can see why this is commonly used. So we can change the firmware such that we don't call that reset, and therefore preserve accuracy.Describe alternatives you've considered
As a work around for now, you could use a boolean variable to call
use_gyro
only when it needs changing.The text was updated successfully, but these errors were encountered: