def _conexion(self): """ Metodo para saber si hay un xbee conectado """ try: ls = duinobot.boards() if len(ls)==0: self.txt_conexiones.texto='no_Xbee' self.btn_robot_refresh.imagen=self.boton_off self.btn_robot_refresh.cuando_hace_click= self.nada else: self.txt_conexiones.texto = str(ls) self.btn_robot_refresh.imagen=self.boton_on self.btn_robot_refresh.cuando_hace_click= self.conectar if self.delet == False: return True else: return False except(): self.txt_conexiones.texto='Problema_en_Duinobot'
def _conexion(self): """ Metodo para saber si hay un xbee conectado """ try: ls = duinobot.boards() if len(ls) == 0: self.txt_conexiones.texto = 'no_Xbee' self.btn_robot_refresh.imagen = self.boton_off self.btn_robot_refresh.cuando_hace_click = self.nada else: self.txt_conexiones.texto = str(ls) self.btn_robot_refresh.imagen = self.boton_on self.btn_robot_refresh.cuando_hace_click = self.conectar if self.delet == False: return True else: return False except (): self.txt_conexiones.texto = 'Problema_en_Duinobot'
def _conexiones(self): self.devices = duinobot.boards() # esto cuelga todo en windows if len(self.devices) > 0: self.conexion = True else: self.conexion = False