Skip to content

Commit 06f290d

Browse files
committed
new get_cooling_status()
1 parent 4b7f5d9 commit 06f290d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

pyobs_fli/flicamera.py

+17
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,23 @@ def status(self, *args, **kwargs) -> dict:
242242
# finished
243243
return s
244244

245+
def get_cooling_status(self, *args, **kwargs) -> (bool, float, float, dict):
246+
"""Returns the current status for the cooling.
247+
248+
Returns:
249+
Tuple containing:
250+
Enabled (bool): Whether the cooling is enabled
251+
SetPoint (float): Setpoint for the cooling in celsius.
252+
Power (float): Current cooling power in percent or None.
253+
Temperatures (dict): Dictionary of sensor name/value pairs with temperatures
254+
"""
255+
enabled = self._temp_setpoint is not None
256+
temps = {
257+
'CCD': self._driver.get_temp(FliTemperature.CCD),
258+
'Base': self._driver.get_temp(FliTemperature.BASE)
259+
}
260+
return enabled, self._temp_setpoint, self._driver.get_cooler_power(), temps
261+
245262
def set_cooling(self, enabled: bool, setpoint: float, *args, **kwargs):
246263
"""Enables/disables cooling and sets setpoint.
247264

0 commit comments

Comments
 (0)