Host commands start with ;@

master
fsantini 2013-04-08 18:49:33 +02:00
parent 5a059961fa
commit a6abdbb74f
2 changed files with 3 additions and 7 deletions

View File

@ -30,10 +30,6 @@ class Line(object):
self.imperial = False
self.relative = False
#ignore host commands
if self.raw.startswith("@"):
self.raw = ""
if ";" in self.raw:
self.raw = self.raw.split(";")[0]

View File

@ -351,7 +351,7 @@ class printcore():
#now only "pause" is implemented as host command
def processHostCommand(self, command):
command = command.lstrip()
if command == "@pause":
if command.startswith(";@pause"):
if self.pronterface != None:
self.pronterface.pause(None)
else:
@ -378,11 +378,11 @@ class printcore():
if self.printing and self.queueindex < len(self.mainqueue):
tline = self.mainqueue[self.queueindex]
#check for host command
if tline.lstrip().startswith("@"):
if tline.lstrip().startswith(";@"):
#it is a host command: pop it from the list
self.mainqueue.pop(self.queueindex)
self.processHostCommand(tline)
return
return
tline = tline.split(";")[0]
if len(tline) > 0: