Commit 9167dfb8 authored by kliment's avatar kliment

Merge pull request #184 from FrozenFire/experimental

Made lines starting with $ pass through
parents abe7d684 c2baae7b
...@@ -274,7 +274,7 @@ class pronsole(cmd.Cmd): ...@@ -274,7 +274,7 @@ class pronsole(cmd.Cmd):
self.helpdict["temperature_pla"] = _("Extruder temp for PLA (default: 185 deg C)") 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["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.helpdict["z_feedrate"] = _("Feedrate for Control Panel Moves in Z (default: 200mm/min)")
self.commandprefixes='MGT$'
def set_temp_preset(self,key,value): def set_temp_preset(self,key,value):
if not key.startswith("bed"): if not key.startswith("bed"):
...@@ -870,14 +870,14 @@ class pronsole(cmd.Cmd): ...@@ -870,14 +870,14 @@ class pronsole(cmd.Cmd):
print "! os.listdir('.')" print "! os.listdir('.')"
def default(self,l): 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): if(self.p and self.p.online):
print "SENDING:"+l print "SENDING:"+l
self.p.send_now(l) self.p.send_now(l)
else: else:
print "Printer is not online." print "Printer is not online."
return 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): if(self.p and self.p.online):
print "SENDING:"+l.upper() print "SENDING:"+l.upper()
self.p.send_now(l.upper()) self.p.send_now(l.upper())
......
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