kopia lustrzana https://github.com/reini1305/eggbot
adaptions to python3
rodzic
ce495a44f5
commit
31adc31abb
|
@ -105,13 +105,14 @@ def main(argv):
|
|||
to_send.append('M05')
|
||||
#print max_point
|
||||
if any (new_point>np.array([[3200],[1000]])):
|
||||
print 'Image too large! 3200 x 1000 is the maximum!'
|
||||
print('Image too large! 3200 x 1000 is the maximum!')
|
||||
ser = serial.Serial(port=serialport,baudrate=2000000,timeout=10)
|
||||
widgets = [Percentage(), ' ', Bar(marker=RotatingMarker()),' ', ETA()]
|
||||
pbar = ProgressBar(widgets=widgets).start()
|
||||
for line in pbar(to_send):
|
||||
#print line
|
||||
ser.write('%s\n'%line)
|
||||
ser_cmd = '%s\n'%line
|
||||
ser.write(ser_cmd.encode())
|
||||
ser.readline()
|
||||
ser.close()
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue