changed error handling of grbl flashing to only flash once and if an error

occurs the state is changed to STATE_CLOSED_WITH_ERROR
This commit is contained in:
make-ing 2015-09-04 11:40:22 +02:00
parent 010e2cfa92
commit 5b70cfb3e5

View file

@ -870,9 +870,11 @@ class MachineCom(object):
returnCode = subprocess.call(params) returnCode = subprocess.call(params)
if returnCode == False: if returnCode == False:
self._log("successfully flashed new grbl version") self._log("successfully flashed new grbl version")
self._openSerial()
else: else:
self._log("error during flashing of new grbl version") self._log("error during flashing of new grbl version")
self._openSerial() self._changeState(self.STATE_CLOSED_WITH_ERROR)
def _monitor(self): def _monitor(self):
feedback_controls, feedback_matcher = convert_feedback_controls(settings().get(["controls"])) feedback_controls, feedback_matcher = convert_feedback_controls(settings().get(["controls"]))