Commit 1c7d89c7 authored by Guillaume Seguin's avatar Guillaume Seguin

Process recvlisteners in pronsole before echoing

This is needed to get sdlisting updated before checking it in the echo
condition.
parent 6cb8ff76
...@@ -1203,6 +1203,8 @@ class pronsole(cmd.Cmd): ...@@ -1203,6 +1203,8 @@ class pronsole(cmd.Cmd):
if report_type == REPORT_TEMP: if report_type == REPORT_TEMP:
self.status.update_tempreading(l) self.status.update_tempreading(l)
tstring = l.rstrip() tstring = l.rstrip()
for listener in self.recvlisteners:
listener(l)
if tstring != "ok" and not self.sdlisting \ if tstring != "ok" and not self.sdlisting \
and not self.monitoring and report_type == REPORT_NONE: and not self.monitoring and report_type == REPORT_NONE:
if tstring[:5] == "echo:": if tstring[:5] == "echo:":
...@@ -1210,8 +1212,6 @@ class pronsole(cmd.Cmd): ...@@ -1210,8 +1212,6 @@ class pronsole(cmd.Cmd):
if self.silent is False: print "\r" + tstring.ljust(15) if self.silent is False: print "\r" + tstring.ljust(15)
sys.stdout.write(self.promptf()) sys.stdout.write(self.promptf())
sys.stdout.flush() sys.stdout.flush()
for listener in self.recvlisteners:
listener(l)
def layer_change_cb(self, newlayer): def layer_change_cb(self, newlayer):
layerz = self.fgcode.all_layers[newlayer].z layerz = self.fgcode.all_layers[newlayer].z
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment