Skip to content

Commit 38428a0

Browse files
committed
new ITemperatures interface
1 parent 7d5d5a7 commit 38428a0

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

pyobs_fli/flicamera.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -222,22 +222,28 @@ def _abort_exposure(self):
222222
self._driver.cancel_exposure()
223223
self._camera_status = ICamera.ExposureStatus.IDLE
224224

225-
def get_cooling_status(self, *args, **kwargs) -> (bool, float, float, dict):
225+
def get_cooling_status(self, *args, **kwargs) -> (bool, float, float):
226226
"""Returns the current status for the cooling.
227227
228228
Returns:
229229
Tuple containing:
230230
Enabled (bool): Whether the cooling is enabled
231231
SetPoint (float): Setpoint for the cooling in celsius.
232232
Power (float): Current cooling power in percent or None.
233-
Temperatures (dict): Dictionary of sensor name/value pairs with temperatures
234233
"""
235234
enabled = self._temp_setpoint is not None
236-
temps = {
235+
return enabled, self._temp_setpoint, self._driver.get_cooler_power()
236+
237+
def get_temperatures(self, *args, **kwargs) -> dict:
238+
"""Returns all temperatures measured by this module.
239+
240+
Returns:
241+
Dict containing temperatures.
242+
"""
243+
return {
237244
'CCD': self._driver.get_temp(FliTemperature.CCD),
238245
'Base': self._driver.get_temp(FliTemperature.BASE)
239246
}
240-
return enabled, self._temp_setpoint, self._driver.get_cooler_power(), temps
241247

242248
def set_cooling(self, enabled: bool, setpoint: float, *args, **kwargs):
243249
"""Enables/disables cooling and sets setpoint.

0 commit comments

Comments
 (0)