- in CNCJob UI Autolevelling - GRBL controller - fixed the send_grbl_command() method
This commit is contained in:
parent
f8eba0084d
commit
96059c4b54
|
@ -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?)
|
||||
- in CNCJob UI Autolevelling - some UI changes
|
||||
- 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
|
||||
|
||||
|
|
|
@ -1111,9 +1111,7 @@ class CNCJobObject(FlatCAMObj, CNCjob):
|
|||
:return: the text returned by the GRBL controller after each command
|
||||
:rtype: str
|
||||
"""
|
||||
stripped_cmd = command.strip()
|
||||
|
||||
cmd = stripped_cmd.rpartition('\n')[0]
|
||||
cmd = command.strip()
|
||||
if echo:
|
||||
self.app.inform_shell[str, bool].emit(cmd, False)
|
||||
|
||||
|
@ -1121,12 +1119,14 @@ class CNCJobObject(FlatCAMObj, CNCjob):
|
|||
snd = cmd + '\n'
|
||||
self.grbl_ser_port.write(snd.encode('utf-8'))
|
||||
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 = ''
|
||||
for line in grbl_out:
|
||||
if echo:
|
||||
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:
|
||||
log.debug("CNCJobObject.send_grbl_command() --> %s" % str(e))
|
||||
if 'ok' in line:
|
||||
|
|
Loading…
Reference in New Issue