step.calibration.calibrate_wfl ============================== .. py:module:: step.calibration.calibrate_wfl .. autoapi-nested-parse:: Wait-for-light sensor calibration step using the new UI library. Classes ------- .. autoapisummary:: step.calibration.calibrate_wfl.WFLCalibrationResult step.calibration.calibrate_wfl.CalibrateWaitForLight Module Contents --------------- .. py:class:: WFLCalibrationResult Result of wait-for-light sensor calibration. .. py:attribute:: light_off :type: float .. py:attribute:: light_on :type: float .. py:attribute:: threshold :type: float .. py:class:: CalibrateWaitForLight(sensor: raccoon.hal.AnalogSensor) Bases: :py:obj:`raccoon.ui.step.UIStep` Calibrate a wait-for-light sensor via interactive measurement. Guides the operator through a two-step measurement flow: first cover the sensor (dark reading), then expose it to the start lamp (light reading). The midpoint threshold is computed and stored so the ``wait_for_light_legacy`` step can detect the lamp signal. The operator can retry measurements if the values look wrong before confirming the calibration. :param sensor: The AnalogSensor instance to calibrate. Example:: from raccoon.step.calibration import calibrate_wait_for_light calibrate_wait_for_light(robot.defs.wait_for_light_sensor) .. py:attribute:: sensor .. py:attribute:: calibration_result :type: Optional[WFLCalibrationResult] :value: None