mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-07-27 19:57:02 +00:00
pybricks.robotics.DriveBase: Revert gyro use via init.
This reverts commit dadaab6f61.
We will introduce a separate class instead.
This commit is contained in:
committed by
laurensvalk
parent
c0cb05dd74
commit
ccd2b46819
@@ -149,7 +149,6 @@ CONSTRUCTOR_PARAMS = [
|
||||
"wheel_diameter: Number",
|
||||
"axle_track: Number",
|
||||
"positive_direction: Direction=Direction.CLOCKWISE",
|
||||
"use_gyro: bool=False",
|
||||
]
|
||||
],
|
||||
),
|
||||
|
||||
@@ -59,9 +59,8 @@ class DriveBase:
|
||||
wheel_diameter: Number,
|
||||
axle_track: Number,
|
||||
positive_direction: Direction = Direction.CLOCKWISE,
|
||||
use_gyro: bool = False,
|
||||
):
|
||||
"""DriveBase(left_motor, right_motor, wheel_diameter, axle_track, positive_direction=Direction.CLOCKWISE, use_gyro=False)
|
||||
"""DriveBase(left_motor, right_motor, wheel_diameter, axle_track, positive_direction=Direction.CLOCKWISE)
|
||||
|
||||
Arguments:
|
||||
left_motor (Motor):
|
||||
@@ -74,12 +73,6 @@ class DriveBase:
|
||||
positive_direction (Direction): Which direction the drive base
|
||||
should turn when you give a positive turn rate or turn
|
||||
angle, viewed from the top.
|
||||
use_gyro (bool): Choose ``True`` to use the internal gyrosope for
|
||||
more accurate turns. This can only be used when
|
||||
the ``positive_direction`` is set to counterclockwise. This is
|
||||
only supported on hubs with an inertial measurement unit (IMU).
|
||||
If you choose ``False`` (the default), turns are measured
|
||||
using the wheel angles.
|
||||
"""
|
||||
|
||||
def drive(self, speed: Number, turn_rate: Number) -> None:
|
||||
|
||||
Reference in New Issue
Block a user