From c2baae7bbbc7a166961a8ef4cb3a677812eeec0a Mon Sep 17 00:00:00 2001 From: Nathan Zadoks Date: Thu, 1 Mar 2012 14:13:57 +0100 Subject: [PATCH] Lines starting with $ are now passed through too. --- pronsole.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pronsole.py b/pronsole.py index cc6c189..3179e56 100755 --- a/pronsole.py +++ b/pronsole.py @@ -274,7 +274,7 @@ class pronsole(cmd.Cmd): self.helpdict["temperature_pla"] = _("Extruder temp for PLA (default: 185 deg C)") self.helpdict["xy_feedrate"] = _("Feedrate for Control Panel Moves in X and Y (default: 3000mm/min)") self.helpdict["z_feedrate"] = _("Feedrate for Control Panel Moves in Z (default: 200mm/min)") - + self.commandprefixes='MGT$' def set_temp_preset(self,key,value): if not key.startswith("bed"): @@ -870,14 +870,14 @@ class pronsole(cmd.Cmd): print "! os.listdir('.')" def default(self,l): - if(l[0]=='M' or l[0]=="G" or l[0]=='T'): + if(l[0] in self.commandprefixes.upper()): if(self.p and self.p.online): print "SENDING:"+l self.p.send_now(l) else: print "Printer is not online." return - if(l[0]=='m' or l[0]=="g" or l[0]=='t'): + elif(l[0] in self.commandprefixes.lower()): if(self.p and self.p.online): print "SENDING:"+l.upper() self.p.send_now(l.upper())