From a9354b94baae90f89984ff38c5307374a953cf5f Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 24 Mar 2023 20:27:33 +0100 Subject: [PATCH] Updated package meta zeug --- picamburst.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/picamburst.py b/picamburst.py index da67e6d..567b5b7 100644 --- a/picamburst.py +++ b/picamburst.py @@ -24,6 +24,10 @@ def get_exposure_stack(factor: int = 2): start = picam2.capture_metadata() exposure_start = start["ExposureTime"] gain_start = start["AnalogueGain"] + if exposure_start > 117000: + print("Low Light levels out of range, can't make HDR") + if exposure_start < factor: + print("HIgh Light levels out of range, cant make HDR") picam2.set_controls({"AeEnable": 0}) confirmed = picam2.capture_metadata()["AeLocked"] @@ -33,7 +37,7 @@ def get_exposure_stack(factor: int = 2): picam2.set_controls({"AnalogueGain": gain_start}) confirmed = picam2.capture_metadata()["AnalogueGain"] - while confirmed != gain_start in range(gain_start -0.1, gain_start +0.1): + while confirmed != gain_start in range(gain_start -1, gain_start +1): confirmed = picam2.capture_metadata()["AnalogueGain"] time.sleep(.1)