Skip to content

Commit

Permalink
Merge pull request #337 from sourcebots/servo
Browse files Browse the repository at this point in the history
Update servo limits, numbers and defaults for servo fw 4.4
  • Loading branch information
inventor02 committed May 3, 2024
2 parents fb513ca + 52a8990 commit 44cfc08
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions sbot/servo_board.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
get_USB_identity, map_to_float, map_to_int,
)

DUTY_MIN = 500
DUTY_MIN = 300
DUTY_MAX = 4000
START_DUTY_MIN = 1000
START_DUTY_MAX = 2000
START_DUTY_MIN = 350
START_DUTY_MAX = 1980
NUM_SERVOS = 8

logger = logging.getLogger(__name__)
BAUDRATE = 115200 # Since the servo board is a USB device, this is ignored
Expand Down Expand Up @@ -77,7 +78,7 @@ def __init__(
self._serial = SerialWrapper(serial_port, BAUDRATE, identity=initial_identity)

self._servos = tuple(
Servo(self._serial, index) for index in range(12)
Servo(self._serial, index) for index in range(NUM_SERVOS)
)

self._identity = self.identify()
Expand Down

0 comments on commit 44cfc08

Please sign in to comment.