def discovery(): roomba_ip = _get_ip_from_arg() roomba_discovery = RoombaDiscovery() if roomba_ip is not None: print(roomba_discovery.find(roomba_ip)) return robots_info = roomba_discovery.find() for robot in robots_info: print(robot)
def test_discovery_with_wrong_msg(self): # given discovery = RoombaDiscovery() # when discovery.roomba_message = "test" response = discovery.find() # then assert not response
def password(): roomba_ip = _get_ip_from_arg() _validate_ip(roomba_ip) _wait_for_input() roomba_discovery = RoombaDiscovery() roomba_info = roomba_discovery.find(roomba_ip) _validate_roomba_info(roomba_info) roomba_password = RoombaPassword(roomba_ip) found_password = roomba_password.get_password() roomba_info.password = found_password print(roomba_info)
def connect(): roomba_ip = _get_ip_from_arg() _validate_ip(roomba_ip) roomba_password = _get_password_from_arg() _validate_password(roomba_password) roomba_discovery = RoombaDiscovery() roomba_info = roomba_discovery.find(roomba_ip) _validate_roomba_info(roomba_info) roomba = Roomba(roomba_info.ip, roomba_info.blid, roomba_password) roomba.register_on_message_callback(lambda msg: print(msg)) roomba.connect() while True: pass