forked from pybricks/pybricks-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrobotics.pyi
More file actions
34 lines (32 loc) · 1.04 KB
/
Copy pathrobotics.pyi
File metadata and controls
34 lines (32 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# SPDX-License-Identifier: MIT
# Copyright (c) 2020 The Pybricks Authors
from typing import Optional, Tuple, overload, Union
from ._common import Control, Motor
class DriveBase:
distance_control: Control
heading_control: Control
def __init__(
self,
left_motor: Motor,
right_motor: Motor,
wheel_diameter: Union[int, float],
axle_track: Union[int, float],
): ...
def drive(self, drive_speed: int, turn_rate: int) -> None: ...
def stop(self) -> None: ...
def distance(self) -> int: ...
def angle(self) -> int: ...
def state(self) -> Tuple[int, int, int, int]: ...
def reset(self) -> None: ...
@overload
def settings(self) -> Tuple[int, int, int, int]: ...
@overload
def settings(
self,
straight_speed: Optional[int],
straight_acceleration: Optional[int],
turn_rate: Optional[int],
turn_acceleration: Optional[int],
) -> None: ...
def straight(self, distance: int) -> None: ...
def turn(self, angle: int) -> None: ...