Script execution

This commit is contained in:
gac-S_Changer
2017-03-23 11:23:07 +01:00
parent fc1ae8ce75
commit 10ea986637

View File

@@ -331,7 +331,7 @@ class RobotTCP(TcpDevice, Stoppable):
def get_task_status(self, name):
code = self.eval_int('taskStatus("' + str(name)+ '")')
#TODO: String assignments in $exec causes application to freeze
#status = self.eval_str('help(' + str(code)+ ')')
#status = self
if code== -1: status = "Stopped"
elif code== 0: status = "Paused"
elif code== 1: status = "Running"
@@ -361,12 +361,10 @@ class RobotTCP(TcpDevice, Stoppable):
self.getLogger().info(ev)
self.on_event(ev)
self._update_state()
print "Before"
self.setCache({"powered": self.powered,
"speed": self.speed,
"empty": self.empty,
"settled": self.settled })
print "After"
"settled": self.settled }, None)
#print time.time() - start
except:
if self.state != State.Offline: