diff --git a/adafruit_ov5640/__init__.py b/adafruit_ov5640/__init__.py index 7d60bba..1e82b64 100644 --- a/adafruit_ov5640/__init__.py +++ b/adafruit_ov5640/__init__.py @@ -1489,14 +1489,14 @@ def effect(self, value: int) -> None: @property def quality(self) -> int: - """Controls the JPEG quality. Valid range is from 2..55 inclusive""" + """Controls the JPEG quality. Valid range is from 2..54 inclusive""" return self._read_register(_COMPRESSION_CTRL07) & 0x3F @quality.setter def quality(self, value: int) -> None: - if not 2 <= value < 55: + if not 2 <= value <= 54: raise ValueError( - f"Invalid quality value {value}, use a value from 2..55 inclusive" + f"Invalid quality value {value}, use a value from 2..54 inclusive" ) self._write_register(_COMPRESSION_CTRL07, value & 0x3F)