Fixed the controller UI from hanging after estop
This commit is contained in:
@@ -327,9 +327,12 @@ module.exports = new Vue({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("log" in e.data) {
|
if (e.data.log && e.data.log.msg !== "Switch not found") {
|
||||||
if (e.data.log.msg !== "Switch not found") {
|
|
||||||
this.$broadcast("log", e.data.log);
|
this.$broadcast("log", e.data.log);
|
||||||
|
|
||||||
|
if (Object.keys(e.data).length === 1) {
|
||||||
|
// If there's only log data, we're done
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,11 @@ module.exports = {
|
|||||||
messages.pop();
|
messages.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (messages[0].repeat > 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
msg.ts = Date.now();
|
msg.ts = Date.now();
|
||||||
|
|
||||||
// Write message to browser console for debugging
|
// Write message to browser console for debugging
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ class Comm(object):
|
|||||||
if level == 'error': self.comm_error()
|
if level == 'error': self.comm_error()
|
||||||
|
|
||||||
# Treat machine alarmed warning as an 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()
|
self.comm_error()
|
||||||
|
|
||||||
def _log_motor_flags(self, update):
|
def _log_motor_flags(self, update):
|
||||||
|
|||||||
@@ -126,7 +126,9 @@ class Log(object):
|
|||||||
def _log(self, msg, level=INFO, prefix='', where=None):
|
def _log(self, msg, level=INFO, prefix='', where=None):
|
||||||
if not msg: return
|
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'))
|
s = hdr + ('\n' + hdr).join(msg.split('\n'))
|
||||||
|
|
||||||
if self.f is not None:
|
if self.f is not None:
|
||||||
|
|||||||
Reference in New Issue
Block a user