How to use the djitellopy.tello.Tello function in djitellopy

To help you get started, we’ve selected a few djitellopy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github damiafuentes / DJITelloPy / djitellopy / tello.py View on Github external
state = state.strip()
        Tello.LOGGER.debug('Raw state data: {}'.format(state))

        if state == 'ok':
            return {}

        state_dict = {}
        for field in state.split(';'):
            split = field.split(':')
            if len(split) < 2:
                continue

            key = split[0]
            value = split[1]

            if key in Tello.state_field_converters:
                try:
                    value = Tello.state_field_converters[key](value)
                except Exception as e:
                    Tello.LOGGER.debug('Error parsing state value for {}: {} to {}'
                                       .format(key, value, Tello.state_field_converters[key]))
                    Tello.LOGGER.error(e)

            state_dict[key] = value

        return state_dict
github damiafuentes / DJITelloPy / djitellopy / swarm.py View on Github external
def fromIps(ips: list):
		"""Create TelloSwarm from a list of IP addresses.

		Arguments:
			ips: list of IP Addresses
		"""
		if len(ips) == 0:
			raise Exception("No ips provided")

		tellos = []
		for ip in ips:
			tellos.append(Tello(ip.strip()))

		return TelloSwarm(tellos)