mirror of
https://github.com/BKLronin/touchCNC.git
synced 2024-11-22 00:24:01 +01:00
Update cnc.py
This commit is contained in:
parent
7940990e7b
commit
c01af877de
3
cnc.py
3
cnc.py
@ -42,7 +42,7 @@ def grblConnect2():
|
|||||||
try:
|
try:
|
||||||
#print([comport.device for comport in serial.tools.list_ports.comports()])
|
#print([comport.device for comport in serial.tools.list_ports.comports()])
|
||||||
print ("Trying...",device)
|
print ("Trying...",device)
|
||||||
grbl = serial.Serial(port= device, baudrate= 115200, timeout =3) #dsrdtr= True)
|
grbl = serial.Serial(port= device, baudrate= 115200, timeout =.5) #dsrdtr= True)
|
||||||
#grbl.open()
|
#grbl.open()
|
||||||
#print(grbl.readline())
|
#print(grbl.readline())
|
||||||
grbl.write(str.encode("\r\n\r\n"))
|
grbl.write(str.encode("\r\n\r\n"))
|
||||||
@ -223,7 +223,6 @@ def grblWrite():
|
|||||||
|
|
||||||
def timedPositionRequest():
|
def timedPositionRequest():
|
||||||
if grbl != 0 and freetosend == 1:
|
if grbl != 0 and freetosend == 1:
|
||||||
|
|
||||||
grbl_command = '?'
|
grbl_command = '?'
|
||||||
byPass(grbl_command)
|
byPass(grbl_command)
|
||||||
root.after(1000, timedPositionRequest)
|
root.after(1000, timedPositionRequest)
|
||||||
|
Loading…
Reference in New Issue
Block a user