Attempt to start the stream if it's stopped.
This commit is contained in:
parent
5a4aae8ed1
commit
be85d07210
1 changed files with 3 additions and 0 deletions
|
|
@ -50,6 +50,9 @@ class JPEGSharpnessMonitor:
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
"Start monitoring sharpness by looking at JPEG size"
|
"Start monitoring sharpness by looking at JPEG size"
|
||||||
|
if not self.camera.stream_active:
|
||||||
|
logging.warn("Autofocus sharpness monitor was started but the camera isn't streaming. Attempting to start the stream...")
|
||||||
|
self.camera.start_stream_recording()
|
||||||
self.background_thread = Thread(target=self._measure_jpegs)
|
self.background_thread = Thread(target=self._measure_jpegs)
|
||||||
self.background_thread.start()
|
self.background_thread.start()
|
||||||
return self
|
return self
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue