Commit 3b7a21d7 authored by Guillaume Seguin's avatar Guillaume Seguin

WIP #575: actually get !! and // to work in pronterface

parent 07af3e4d
...@@ -1244,12 +1244,12 @@ class pronsole(cmd.Cmd): ...@@ -1244,12 +1244,12 @@ class pronsole(cmd.Cmd):
def recvcb(self, l): def recvcb(self, l):
l = l.rstrip() l = l.rstrip()
for listener in self.recvlisteners:
listener(l)
if not self.recvcb_actions(l): if not self.recvcb_actions(l):
report_type = self.recvcb_report(l) report_type = self.recvcb_report(l)
if report_type & REPORT_TEMP: if report_type & REPORT_TEMP:
self.status.update_tempreading(l) self.status.update_tempreading(l)
for listener in self.recvlisteners:
listener(l)
if l != "ok" and not self.sdlisting \ if l != "ok" and not self.sdlisting \
and not self.monitoring and (report_type == REPORT_NONE or report_type & REPORT_MANUAL): and not self.monitoring and (report_type == REPORT_NONE or report_type & REPORT_MANUAL):
if l[:5] == "echo:": if l[:5] == "echo:":
......
...@@ -1700,17 +1700,16 @@ Printrun. If not, see <http://www.gnu.org/licenses/>.""" ...@@ -1700,17 +1700,16 @@ Printrun. If not, see <http://www.gnu.org/licenses/>."""
def recvcb(self, l): def recvcb(self, l):
l = l.rstrip() l = l.rstrip()
if l.startswith("!!"): if not self.recvcb_actions(l):
return report_type = self.recvcb_report(l)
report_type = self.recvcb_report(l) isreport = report_type != REPORT_NONE
isreport = report_type != REPORT_NONE if report_type & REPORT_POS:
if report_type & REPORT_POS: self.update_pos()
self.update_pos() elif report_type & REPORT_TEMP:
elif report_type & REPORT_TEMP: wx.CallAfter(self.tempdisp.SetLabel, self.tempreadings.strip().replace("ok ", ""))
wx.CallAfter(self.tempdisp.SetLabel, self.tempreadings.strip().replace("ok ", "")) self.update_tempdisplay()
self.update_tempdisplay() if not self.p.loud and (l not in ["ok", "wait"] and not isreport):
if not self.p.loud and (l not in ["ok", "wait"] and not isreport): wx.CallAfter(self.addtexttolog, l + "\n")
wx.CallAfter(self.addtexttolog, l + "\n")
for listener in self.recvlisteners: for listener in self.recvlisteners:
listener(l) listener(l)
......
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