mirror of
https://github.com/damiafuentes/DJITelloPy.git
synced 2024-10-25 03:27:46 +03:00
Fix Reconnect Issue
Client socket is never bound to receiving port to receive drone replies; This causes DJITelloPy to not be able to reconnect after running a script once. By binding it, the drone is able to reconnect without issue. This was adopted from my other branch, [LightDJITelloPy](https://github.com/Desperationis/LightDJITelloPy).
This commit is contained in:
@@ -110,6 +110,7 @@ class Tello:
|
||||
if not threads_initialized:
|
||||
# Run Tello command responses UDP receiver on background
|
||||
client_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
|
||||
client_socket.bind(("", Tello.CONTROL_UDP_PORT))
|
||||
response_receiver_thread = Thread(target=Tello.udp_response_receiver)
|
||||
response_receiver_thread.daemon = True
|
||||
response_receiver_thread.start()
|
||||
|
||||
Reference in New Issue
Block a user