Adjust name for a number of propery/setting setters
This commit is contained in:
parent
26d395f05d
commit
5df5651fc2
2 changed files with 7 additions and 7 deletions
|
|
@ -584,7 +584,7 @@ class BaseCamera(lt.Thing):
|
||||||
return self._detector_name
|
return self._detector_name
|
||||||
|
|
||||||
@detector_name.setter
|
@detector_name.setter
|
||||||
def detector_name(self, name: str) -> None:
|
def _set_detector_name(self, name: str) -> None:
|
||||||
"""Validate and set detector_name."""
|
"""Validate and set detector_name."""
|
||||||
if name not in self.background_detectors:
|
if name not in self.background_detectors:
|
||||||
self.logger.warning(f"{name} is not a valid background detector name.")
|
self.logger.warning(f"{name} is not a valid background detector name.")
|
||||||
|
|
@ -633,7 +633,7 @@ class BaseCamera(lt.Thing):
|
||||||
return data
|
return data
|
||||||
|
|
||||||
@background_detector_data.setter
|
@background_detector_data.setter
|
||||||
def background_detector_data(self, data: dict) -> None:
|
def _set_background_detector_data(self, data: dict) -> None:
|
||||||
"""Set the data for each detector. Only to be used as settings are loaded from disk.
|
"""Set the data for each detector. Only to be used as settings are loaded from disk.
|
||||||
|
|
||||||
Do not call over HTTP. This needs to be updated once LbaThings Settings can be
|
Do not call over HTTP. This needs to be updated once LbaThings Settings can be
|
||||||
|
|
|
||||||
|
|
@ -215,7 +215,7 @@ class StreamingPiCamera2(BaseCamera):
|
||||||
return self._analogue_gain
|
return self._analogue_gain
|
||||||
|
|
||||||
@analogue_gain.setter
|
@analogue_gain.setter
|
||||||
def analogue_gain(self, value: float) -> None:
|
def _set_analogue_gain(self, value: float) -> None:
|
||||||
self._analogue_gain = value
|
self._analogue_gain = value
|
||||||
if self.streaming:
|
if self.streaming:
|
||||||
with self._streaming_picamera() as cam:
|
with self._streaming_picamera() as cam:
|
||||||
|
|
@ -235,7 +235,7 @@ class StreamingPiCamera2(BaseCamera):
|
||||||
return self._colour_gains
|
return self._colour_gains
|
||||||
|
|
||||||
@colour_gains.setter
|
@colour_gains.setter
|
||||||
def colour_gains(self, value: tuple[float, float]) -> None:
|
def _set_colour_gains(self, value: tuple[float, float]) -> None:
|
||||||
self._colour_gains = value
|
self._colour_gains = value
|
||||||
if self.streaming:
|
if self.streaming:
|
||||||
with self._streaming_picamera() as cam:
|
with self._streaming_picamera() as cam:
|
||||||
|
|
@ -259,7 +259,7 @@ class StreamingPiCamera2(BaseCamera):
|
||||||
return self._exposure_time
|
return self._exposure_time
|
||||||
|
|
||||||
@exposure_time.setter
|
@exposure_time.setter
|
||||||
def exposure_time(self, value: int) -> None:
|
def _set_exposure_time(self, value: int) -> None:
|
||||||
self._exposure_time = value
|
self._exposure_time = value
|
||||||
if self.streaming:
|
if self.streaming:
|
||||||
with self._streaming_picamera() as cam:
|
with self._streaming_picamera() as cam:
|
||||||
|
|
@ -303,7 +303,7 @@ class StreamingPiCamera2(BaseCamera):
|
||||||
return SensorModeSelector(**self._sensor_mode)
|
return SensorModeSelector(**self._sensor_mode)
|
||||||
|
|
||||||
@sensor_mode.setter
|
@sensor_mode.setter
|
||||||
def sensor_mode(self, new_mode: Optional[SensorModeSelector | dict]) -> None:
|
def _set_sensor_mode(self, new_mode: Optional[SensorModeSelector | dict]) -> None:
|
||||||
"""Change the sensor mode used."""
|
"""Change the sensor mode used."""
|
||||||
if new_mode is None:
|
if new_mode is None:
|
||||||
self._sensor_mode = None
|
self._sensor_mode = None
|
||||||
|
|
@ -873,7 +873,7 @@ class StreamingPiCamera2(BaseCamera):
|
||||||
return tf_utils.get_lst(self.tuning)
|
return tf_utils.get_lst(self.tuning)
|
||||||
|
|
||||||
@lens_shading_tables.setter
|
@lens_shading_tables.setter
|
||||||
def lens_shading_tables(self, lst: tf_utils.LensShading) -> None:
|
def _set_lens_shading_tables(self, lst: tf_utils.LensShading) -> None:
|
||||||
"""Set the lens shading tables."""
|
"""Set the lens shading tables."""
|
||||||
with self._streaming_picamera(pause_stream=True):
|
with self._streaming_picamera(pause_stream=True):
|
||||||
self.tuning = tf_utils.set_lst(
|
self.tuning = tf_utils.set_lst(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue