- in CNCJob UI Autolevelling - GRBL controller - fixed the send_grbl_command() method
This commit is contained in:
@@ -15,6 +15,7 @@ CHANGELOG for FlatCAM beta
|
|||||||
- made sure that when doing units conversion keep only the decimals specified in the application decimals setting (should differentiate between values and display?)
|
- made sure that when doing units conversion keep only the decimals specified in the application decimals setting (should differentiate between values and display?)
|
||||||
- in CNCJob UI Autolevelling - some UI changes
|
- in CNCJob UI Autolevelling - some UI changes
|
||||||
- in CNCJob UI Autolevelling - GRBL controller - added the probing method
|
- in CNCJob UI Autolevelling - GRBL controller - added the probing method
|
||||||
|
- in CNCJob UI Autolevelling - GRBL controller - fixed the send_grbl_command() method
|
||||||
|
|
||||||
23.08.2020
|
23.08.2020
|
||||||
|
|
||||||
|
|||||||
@@ -1111,9 +1111,7 @@ class CNCJobObject(FlatCAMObj, CNCjob):
|
|||||||
:return: the text returned by the GRBL controller after each command
|
:return: the text returned by the GRBL controller after each command
|
||||||
:rtype: str
|
:rtype: str
|
||||||
"""
|
"""
|
||||||
stripped_cmd = command.strip()
|
cmd = command.strip()
|
||||||
|
|
||||||
cmd = stripped_cmd.rpartition('\n')[0]
|
|
||||||
if echo:
|
if echo:
|
||||||
self.app.inform_shell[str, bool].emit(cmd, False)
|
self.app.inform_shell[str, bool].emit(cmd, False)
|
||||||
|
|
||||||
@@ -1121,12 +1119,14 @@ class CNCJobObject(FlatCAMObj, CNCjob):
|
|||||||
snd = cmd + '\n'
|
snd = cmd + '\n'
|
||||||
self.grbl_ser_port.write(snd.encode('utf-8'))
|
self.grbl_ser_port.write(snd.encode('utf-8'))
|
||||||
grbl_out = self.grbl_ser_port.readlines()
|
grbl_out = self.grbl_ser_port.readlines()
|
||||||
|
if not grbl_out:
|
||||||
|
self.app.inform_shell[str, bool].emit('\t\t\t: No answer\n', False)
|
||||||
|
|
||||||
result = ''
|
result = ''
|
||||||
for line in grbl_out:
|
for line in grbl_out:
|
||||||
if echo:
|
if echo:
|
||||||
try:
|
try:
|
||||||
self.app.inform_shell.emit(' : ' + line.decode('utf-8').strip().upper())
|
self.app.inform_shell.emit('\t\t\t: ' + line.decode('utf-8').strip().upper())
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
log.debug("CNCJobObject.send_grbl_command() --> %s" % str(e))
|
log.debug("CNCJobObject.send_grbl_command() --> %s" % str(e))
|
||||||
if 'ok' in line:
|
if 'ok' in line:
|
||||||
|
|||||||
Reference in New Issue
Block a user