self.do_send("102 Vend all motors complete")
def do_vend(self,command):
- self.do_send("153 Home sensors failing")
+ fail = None
+ if fail:
+ self.do_send("153 Home sensors failing")
+ else:
+ self.insert("Vending ",command)
+ self.do_send("100 Vend successful")
def do_display(self,string):
display = self.wTree.get_widget("label1")
def do_silence(self,command):
pass
+ def do_switches(self):
+ pass
+
+ def do_pong(self):
+ self.do_send("000 PONG!\n")
def handle_command(self, command):
command = string.upper(command)
self.do_help()
elif string.find(command, "ABOUT",0) == 0:
self.do_about()
+ elif string.find(command, "PING",0) == 0:
+ self.do_pong()
elif string.find(command, "VALL",0) == 0:
self.do_vend_all()
elif string.find(command, "V",0) == 0:
self.do_vend(command)
elif string.find(command, "B",0) == 0:
self.do_beep(command)
- elif string.find(command, "S",0) == 0:
+ elif string.find(command, "C",0) == 0:
self.do_silence(command)
+ elif string.find(command, "S",0) == 0:
+ self.do_switches()
elif string.find(command, "D",0) == 0:
- self.do_display(command[1:-1])
+ self.do_display(command[1:])
self.do_prompt()