Add calibration_required property to Camera and CSM things.

This commit is contained in:
Julian Stirling 2025-10-22 14:12:42 +01:00
parent f8e5d877db
commit c0a8d15628
3 changed files with 19 additions and 0 deletions

View file

@ -198,6 +198,15 @@ class BaseCamera(lt.Thing):
"""Close hardware connection when the Thing context manager is closed."""
raise NotImplementedError("CameraThings must define their own __exit__ method")
@lt.thing_property
def calibration_required(self) -> bool:
"""Whether the camera needs calibrating.
This always returns False in BaseCamera. It should be reimplemented by child
classes if calibration is required.
"""
return False
@lt.thing_action
def start_streaming(
self, main_resolution: tuple[int, int], buffer_count: int