def manual(opts):
if opts.mock:
bot = MockEiBotBoard()
else:
bot = EiBotBoard.find()
try:
bot.servo_setup(config.PEN_DOWN_POSITION, config.PEN_UP_POSITION,
config.SERVO_SPEED, config.SERVO_SPEED)
if opts.cmd:
cmd = ' '.join(opts.cmd)
manual_command(bot, cmd)
else:
while True:
cmd = input('(axibot) ')
manual_command(bot, cmd)
finally:
bot.close()
评论列表
文章目录