mirror of
https://github.com/damiafuentes/DJITelloPy.git
synced 2024-10-25 03:27:46 +03:00
Make some changes to make it work
This commit is contained in:
@@ -1065,7 +1065,7 @@ class BackgroundFrameRead:
|
||||
self.frames.append(np.array(frame.to_image()))
|
||||
else:
|
||||
with self.lock:
|
||||
self.frame = frame
|
||||
self.frame = np.array(frame.to_image())
|
||||
|
||||
if self.stopped:
|
||||
self.container.close()
|
||||
@@ -1088,12 +1088,16 @@ class BackgroundFrameRead:
|
||||
"""
|
||||
Access the frame variable directly
|
||||
"""
|
||||
if self._with_queue:
|
||||
if self.with_queue:
|
||||
return self.get_queued_frame()
|
||||
|
||||
with self._lock:
|
||||
with self.lock:
|
||||
return self._frame
|
||||
|
||||
@frame.setter
|
||||
def frame(self, value):
|
||||
self._frame = value
|
||||
|
||||
def stop(self):
|
||||
"""Stop the frame update worker
|
||||
Internal method, you normally wouldn't call this yourself.
|
||||
|
||||
Reference in New Issue
Block a user