@@ -131,12 +131,10 @@ def settings(
131131 straight_acceleration : Optional [Number ] = None ,
132132 turn_rate : Optional [Number ] = None ,
133133 turn_acceleration : Optional [Number ] = None ,
134- ) -> None :
135- ...
134+ ) -> None : ...
136135
137136 @overload
138- def settings (self ) -> Tuple [int , int , int , int ]:
139- ...
137+ def settings (self ) -> Tuple [int , int , int , int ]: ...
140138
141139 def settings (self , * args ):
142140 """
@@ -249,14 +247,22 @@ class Car:
249247 steering.
250248 """
251249
252- def __init__ (self , steering_motor : Motor , drive_motors : Motor | Tuple [Motor , ...]):
253- """Car(steering_motor, drive_motors)
250+ def __init__ (
251+ self ,
252+ steer_motor : Motor ,
253+ drive_motors : Motor | Tuple [Motor , ...],
254+ torque_limit : Number = 100 ,
255+ ):
256+ """Car(steer_motor, drive_motors, torque_limit=100)
254257
255258 Arguments:
256- steering_motor (Motor):
259+ steer_motor (Motor):
257260 The motor that steers the front wheels.
258261 drive_motors (Motor): The motor that drives the wheels. Use a tuple
259262 for multiple motors.
263+ torque_limit (Number, %): The maximum torque limit used to find the
264+ endpoints for the steering mechanism, as a percentage of the
265+ maximum torque of the steering motor.
260266 """
261267
262268 def steer (self , percentage : Number ) -> None :
@@ -273,11 +279,11 @@ def steer(self, percentage: Number) -> None:
273279 def drive_power (self , power : Number ) -> None :
274280 """drive_power(power)
275281
276- Drives the car at a given "power" level, as a percentage of the
277- battery voltage. Positive values drive forward, negative values drive
278- backward.
282+ Drives the car at a given power level. Positive values drive forward,
283+ negative values drive backward.
279284
280- For ``power`` values below 30%, the car will coast the wheels in order
285+ The ``power`` value is used to set the motor voltage as a percentage of
286+ the battery voltage. Below 10%, the car will coast the wheels in order
281287 to roll out smoothly instead of braking abruptly.
282288
283289 This command is useful for remote control applications where you want
0 commit comments