From 4135532476cdcace21a753da42e47fcf0874adef Mon Sep 17 00:00:00 2001 From: Julian Stirling Date: Thu, 9 Oct 2025 16:40:03 +0000 Subject: [PATCH] Apply suggestions from code review of branch ce-disable --- .../things/camera/picamera_tuning_file_utils.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/openflexure_microscope_server/things/camera/picamera_tuning_file_utils.py b/src/openflexure_microscope_server/things/camera/picamera_tuning_file_utils.py index d9c6076b..b202616a 100644 --- a/src/openflexure_microscope_server/things/camera/picamera_tuning_file_utils.py +++ b/src/openflexure_microscope_server/things/camera/picamera_tuning_file_utils.py @@ -107,15 +107,13 @@ def geq_is_static(tuning: dict) -> bool: def set_ce_to_disabled( tuning: dict, ) -> None: - """Update the ``rpi.ce_enable`` section of a camera tuning dict. + """Set ``ce_enable`` in ``rpi.contrast`` to zero to disable adaptive contrast enhancement. :param tuning: the raspberry pi tuning file. This will be updated in-place to set ce_enable to 0. """ contrast = Picamera2.find_tuning_algo(tuning, "rpi.contrast") - contrast["ce_enable"] = ( - 0 # disable ce_enable to prevent adaptive contrast enhancement - ) + contrast["ce_enable"] = 0 def ce_enable_is_static(tuning: dict) -> bool: