This commit is contained in:
@@ -179,10 +179,21 @@
|
||||
tx = tx + toString(".4", t.ry) + "|"
|
||||
tx = tx + toString(".4", t.rz) + "|"
|
||||
break
|
||||
case "get_help"
|
||||
toNum(args[0], aux, ok)
|
||||
if ok == true
|
||||
tx = help(aux)
|
||||
else
|
||||
ex = "Invalid code: " + args[0]
|
||||
endIf
|
||||
break
|
||||
default
|
||||
//App specific
|
||||
call onCommandTcp(cmd,args, tx, ex)
|
||||
break
|
||||
if ((len(tx) == 0) and (len(ex) == 0))
|
||||
ex = "Invalid command: " + cmd
|
||||
endIf
|
||||
break
|
||||
endSwitch
|
||||
last_id = msg_id
|
||||
endIf
|
||||
|
||||
@@ -22,9 +22,6 @@
|
||||
tx = "Mounting sample " + toString("", puck) + ":" + toString("", sample)
|
||||
//taskCreate "mount",10,mount(puck, sample)
|
||||
break
|
||||
default
|
||||
ex = "Invalid command: " + cmd
|
||||
break
|
||||
endSwitch
|
||||
end]]></Code>
|
||||
</Program>
|
||||
|
||||
@@ -314,8 +314,11 @@ class RobotTCP(TcpDevice, Stoppable):
|
||||
code = self.eval_int('taskStatus("' + str(name)+ '")')
|
||||
#TODO: String assignments in $exec causes application to freeze
|
||||
#status = self.eval_str('help(' + str(code)+ ')')
|
||||
status = get_help.evaluate('get_help("' + str(code)+ '")')')
|
||||
return code
|
||||
if code== -1: status = "Stopped"
|
||||
elif code== 0: status = "Paused"
|
||||
elif code== 1: status = "Running"
|
||||
else: status = self.execute('get_help', code)
|
||||
return (code,status)
|
||||
|
||||
#Updating
|
||||
def update_status(self):
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
"""
|
||||
#robot_tcp.task_create("simulateEvents",3, name = "test", priority = 20)
|
||||
robot_tcp.task_create("simulateEvents",3, name = "test", priority = 20)
|
||||
print robot_tcp.get_task_status("test")
|
||||
print robot_tcp.get_task_status("tests")
|
||||
|
||||
@@ -10,7 +9,6 @@ print robot_tcp.get_task_status("test")
|
||||
|
||||
robot_tcp.task_kill("test")
|
||||
print robot_tcp.get_task_status("test")
|
||||
"""
|
||||
|
||||
|
||||
print robot_tcp.is_powered()
|
||||
|
||||
Reference in New Issue
Block a user