Skip to content

Commit c2a8c15

Browse files
author
Thomas Preston
committed
Added servo_set doc string
1 parent 074a09d commit c2a8c15

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

codebug_tether/core.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,9 @@ def pwm_off(self):
220220
self.and_mask(CHANNEL_INDEX_PWM_CONF_2, go_busy_off_mask)
221221

222222
def servo_set(self, servo_index, pulse_length):
223+
"""Set the servo at servo_index to pulse_length. Make sure that
224+
the leg is configured as IO_DIGITAL_OUTPUT (0).
225+
"""
223226
pulse_length_msb = 0xff & (pulse_length >> 8)
224227
pulse_length_lsb = 0xff & pulse_length
225228
conf_msb = ((servo_index & 0xf) << 4) | 0x01

0 commit comments

Comments
 (0)