Command Thread
Thread resposible for sending control information/instructions to drone socket port=5556.
Sending Commands
Sending commands is implemented using the interface provided by the drones manufacturers. You can send as in the following example for land instruction:
socket.send("AT*REF=#ID#," + "290717696" + "\r")
Refer to the official documentation for more details.
Command Class
- class dronevis.drone_connect.command.Command(ip='192.168.1.1')
Command thread implementation for sending commands through a socket created between the drone and the sender.
- __init__(ip='192.168.1.1')
Initialize thread instance
- Parameters:
ip (str, optional) – ip of the drone. Defaults to “192.168.1.1”.
- Raises:
ConnectionError – raise an error if user is not connected to the drone
- command(command='')
Send a command to the AR.Drone
- configure(argument, value)
Set a configuration onto the drone
- ack_command()
Call this function when the command is acknowledge
- Returns:
flag for valid ack
- Return type:
Call this function when navdata are enabled
- Parameters:
activate (bool, optional) – whether to activate navdata. Defaults to True.
- run()
Send commands every 30ms
- reconnect()
Try to restart the socket