Commit 56f7fd6e authored by unknown's avatar unknown

Added status

parent b3eab238
...@@ -123,6 +123,17 @@ class XMLstatus(object): ...@@ -123,6 +123,17 @@ class XMLstatus(object):
def index(self): def index(self):
#handle connect push, then reload page #handle connect push, then reload page
txt='<?xml version="1.0"?>\n<pronterface>\n' txt='<?xml version="1.0"?>\n<pronterface>\n'
state="Offline"
if self.statuscheck or self.p.online:
state="Idle"
if self.sdprinting:
state="SDPrinting"
if self.p.printing:
state="Printing"
if self.paused:
state="Paused"
txt=txt+'<state>'+state+'</state>\n'
txt=txt+'<file>'+str(gPronterPtr.filename)+'</file>\n' txt=txt+'<file>'+str(gPronterPtr.filename)+'</file>\n'
txt=txt+'<status>'+str(gPronterPtr.status.GetStatusText())+'</status>\n' txt=txt+'<status>'+str(gPronterPtr.status.GetStatusText())+'</status>\n'
try: try:
......
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