Fix exposure time adjusting when setting the same value and add test
Closes #433
This commit is contained in:
parent
9966cb0fbb
commit
4e78f3d104
2 changed files with 47 additions and 9 deletions
|
|
@ -201,6 +201,13 @@ class StreamingPiCamera2(BaseCamera):
|
|||
"ExposureTime", int, description="The exposure time in microseconds"
|
||||
)
|
||||
|
||||
@exposure_time.setter
|
||||
def exposure_time(self, value: int):
|
||||
with self.picamera() as cam:
|
||||
# Note: This set a value 1 higher than requested as picamera2 always sets
|
||||
# a lower value than requested, even if the requested is allowed
|
||||
cam.set_controls({"ExposureTime": value + 1})
|
||||
|
||||
_sensor_modes = None
|
||||
|
||||
@thing_property
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue