Skip to content

Commit bf9b3a1

Browse files
authored
Linting.
1 parent 0c58595 commit bf9b3a1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/Robot.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def _right_speed(self, speed):
4949
speed = max(-1, min(1, speed)) # Constrain speed to 0-255 after trimming.
5050
kit.motor2.throttle = speed
5151

52+
@static.method
5253
def stop(self):
5354
"""Stop all movement."""
5455
kit.motor1.throttle = 0
@@ -68,7 +69,8 @@ def forward(self, speed, seconds=None):
6869
self.stop()
6970

7071
def steer(self, speed, direction):
71-
# Move forward at the specified speed (0- 1). Direction is +- 1. Full left is -1, Full right is +1
72+
# Move forward at the specified speed (0- 1). Direction is +- 1.
73+
# Full left is -1, Full right is +1
7274
if (speed + direction/2) > 1:
7375
speed = speed - direction/2 # calibrate so total motor output never goes above 1
7476
left = speed + direction/2

0 commit comments

Comments
 (0)