37
37
class _BaseServo : # pylint: disable-msg=too-few-public-methods
38
38
"""Shared base class that handles pulse output based on a value between 0 and 1.0
39
39
40
+ :param ~pulseio.PWMOut pwm_out: PWM output object.
40
41
:param int min_pulse: The minimum pulse length of the servo in microseconds.
41
- :param int max_pulse: The maximum pulse length of the servo in microseconds.
42
- :param int range: The physical range of the servo corresponding to the signal's duty in
43
- degrees."""
42
+ :param int max_pulse: The maximum pulse length of the servo in microseconds."""
44
43
def __init__ (self , pwm_out , * , min_pulse = 1000 , max_pulse = 2000 ):
45
44
self ._min_duty = int ((min_pulse * pwm_out .frequency ) / 1000000 * 0xffff )
46
45
max_duty = (max_pulse * pwm_out .frequency ) / 1000000 * 0xffff
@@ -60,11 +59,11 @@ def _fraction(self, value):
60
59
class Servo (_BaseServo ):
61
60
"""Control the position of a servo.
62
61
62
+ :param ~pulseio.PWMOut pwm_out: PWM output object.
63
63
:param int actuation_range: The physical range of the servo corresponding to the signal's
64
64
duty in degrees.
65
65
:param int min_pulse: The minimum pulse length of the servo in microseconds.
66
- :param int max_pulse: The maximum pulse length of the servo in microseconds.
67
- :param int trim: Slight shift of values to calibrate stopped value in microseconds."""
66
+ :param int max_pulse: The maximum pulse length of the servo in microseconds."""
68
67
def __init__ (self , pwm_out , * , actuation_range = 180 , min_pulse = 1000 , max_pulse = 2000 ):
69
68
super ().__init__ (pwm_out , min_pulse = min_pulse , max_pulse = max_pulse )
70
69
self ._actuation_range = actuation_range
@@ -85,8 +84,7 @@ class ContinuousServo(_BaseServo):
85
84
"""Control a continuous rotation servo.
86
85
87
86
:param int min_pulse: The minimum pulse length of the servo in microseconds.
88
- :param int max_pulse: The maximum pulse length of the servo in microseconds.
89
- :param int trim: Slight shift of values to calibrate stopped value in microseconds."""
87
+ :param int max_pulse: The maximum pulse length of the servo in microseconds."""
90
88
@property
91
89
def throttle (self ):
92
90
"""How much power is being delivered to the motor. Values range from ``-1.0`` (full
0 commit comments