mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-11 17:14:41 +00:00
pybricks.robotics: add type hint for curve()
This method was added in 30803fc.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Copyright (c) 2018-2020 The Pybricks Authors
|
||||
# Copyright (c) 2018-2021 The Pybricks Authors
|
||||
|
||||
"""Robotics module for the Pybricks API."""
|
||||
|
||||
@@ -100,8 +100,9 @@ class DriveBase:
|
||||
"""Resets the estimated driven distance and angle to 0."""
|
||||
pass
|
||||
|
||||
def settings(self, straight_speed, straight_acceleration, turn_rate,
|
||||
turn_acceleration):
|
||||
def settings(
|
||||
self, straight_speed, straight_acceleration, turn_rate, turn_acceleration
|
||||
):
|
||||
"""Configures the speed and acceleration used
|
||||
by :meth:`.straight`, :meth:`.turn`, and :meth:`.curve`.
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Copyright (c) 2020 The Pybricks Authors
|
||||
# Copyright (c) 2020-2021 The Pybricks Authors
|
||||
|
||||
from typing import Optional, Tuple, overload, Union
|
||||
|
||||
from ._common import Control, Motor
|
||||
from .parameters import Stop
|
||||
|
||||
class DriveBase:
|
||||
distance_control: Control
|
||||
@@ -32,3 +34,6 @@ class DriveBase:
|
||||
) -> None: ...
|
||||
def straight(self, distance: int) -> None: ...
|
||||
def turn(self, angle: int) -> None: ...
|
||||
def curve(
|
||||
self, radius: int, angle: int, then: Stop = Stop.HOLD, wait: bool = True
|
||||
) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user