From 96c0dd7c640e544264cc0183b7ad8f9f4c72396d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20L=C3=B6w?= Date: Fri, 9 Jun 2023 18:11:22 +0200 Subject: [PATCH] :bug: invalidate background_frame_read when calling streamoff --- djitellopy/tello.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/djitellopy/tello.py b/djitellopy/tello.py index 7529ccc..bc7e69a 100644 --- a/djitellopy/tello.py +++ b/djitellopy/tello.py @@ -601,6 +601,10 @@ def streamoff(self): self.send_control_command("streamoff") self.stream_on = False + if self.background_frame_read is not None: + self.background_frame_read.stop() + self.background_frame_read = None + def emergency(self): """Stop all motors immediately. """