Fixed the controller UI from hanging after estop

This commit is contained in:
David Carley
2022-09-13 00:24:31 +00:00
parent fcc4ed8b03
commit 1a44fe3c8e
4 changed files with 17 additions and 7 deletions

View File

@@ -133,7 +133,7 @@ class Comm(object):
if level == 'error': self.comm_error()
# Treat machine alarmed warning as an error
if level == 'warning' and 'code' in msg and msg['code'] == 11:
if level == 'warning' and 'code' in msg and msg['code'] == 12:
self.comm_error()
def _log_motor_flags(self, update):

View File

@@ -126,7 +126,9 @@ class Log(object):
def _log(self, msg, level=INFO, prefix='', where=None):
if not msg: return
hdr = '%s:%s:' % ('DIMWE'[level], prefix)
timestamp = datetime.datetime.now().strftime("%H:%M:%S")
hdr = '%s:%s:%s:' % ('DIMWE'[level], prefix, timestamp)
s = hdr + ('\n' + hdr).join(msg.split('\n'))
if self.f is not None: