how would you do this for the picamera2.start() command?Hi, I wonder if this kind of idiom might help. Instead of "array = picam2.capture_array()" (which might wait forever) you could try:Note that if a "job" times out, it's still running in the camera thread, so you can poll it again later. There's no way currently to cancel jobs that are in progress.Code:
job = picam2.capture_array(wait=False)# Either now, or at any later time, usetry: array = job.get_result(timeout=1.0) # can use 0.0 to poll without waitingexcept TimeoutError: print("oh dear")
this does not work...
Code:
job = picam2.start()try: job.get_result(timeout=1.0) except TimeoutError: print("oh dear")
Statistics: Posted by nirb — Mon Jul 01, 2024 12:35 pm