本文整理汇总了Python中motor.Motor.cleanup方法的典型用法代码示例。如果您正苦于以下问题:Python Motor.cleanup方法的具体用法?Python Motor.cleanup怎么用?Python Motor.cleanup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类motor.Motor
的用法示例。
在下文中一共展示了Motor.cleanup方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: int
# 需要导入模块: from motor import Motor [as 别名]
# 或者: from motor.Motor import cleanup [as 别名]
z_mil = int(config['grid']['z_step_p_millimeter'])
print(' xdir: ' + str(xdir) + ' xstep: ' + str(xstep))
print(' ydir: ' + str(ydir) + ' ystep: ' + str(ystep))
print(' zdir: ' + str(zdir) + ' zstep: ' + str(zstep))
print(' enable pin: ' + str(enable_pin))
print(' sleep time: ' + str(sleep_time))
print(' ---------------------')
print(' x_mil: ' + str(x_mil))
print(' y_mil: ' + str(y_mil))
print(' z_mil: ' + str(z_mil))
inputok = input('- Looks good? Keep going? (y/n) ')
if inputok != 'y':
sys.exit('( ! ) Okay. Stopping ...')
Motor.cleanup(motor)
motor = Motor(xdir, xstep, ydir, ystep, zdir, zstep, enable_pin, sleep_time)
Motor.setup(motor)
#import code; code.interact(local=dict(globals(), **locals()))
operator = FileOperator(motor, x_mil, y_mil, z_mil)
print('')
print('( 3 ) Choosing GCODE File')
files = os.listdir('./gcodefiles/')
filnum = -1
for file in files:
filnum += 1
print(' ' + str(filnum) + ' : ' + file)
inputfile = input('- Choose file by entering (0...' + str(filnum) + '): ')