Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
# servo power immediately, respectively.
#
# This feature requires EBB hardware v 2.5.0 and firmware 2.6.0
#
# Reference: http://evil-mad.github.io/EggBot/ebb.html#SR
#
if port_name is not None:
version_status = ebb_serial.min_version(port_name,"2.6.0")
if not version_status:
return # Unable to read version, or version is below 2.6.0.
else:
if state is None:
str_output = 'SR,{0}\r'.format(timeout_ms)
else:
str_output = 'SR,{0},{1}\r'.format(timeout_ms, state)
ebb_serial.command(port_name, str_output)
def doABMove(port_name, delta_a, delta_b, duration):
# Issue command to move A/B axes as: "XM,,,"
# Then, moves by + , and as -
if port_name is not None:
str_output = 'XM,{0},{1},{2}\r'.format(duration, delta_a, delta_b)
ebb_serial.command(port_name, str_output)