From 185b47a4717de502b17434e7c721434d4e20e4d8 Mon Sep 17 00:00:00 2001 From: Markus Zolliker Date: Tue, 12 Dec 2023 12:11:13 +0100 Subject: [PATCH] frappy_psi.triton: fix heater output issue when output_module is not HeaterOutputWith range, the heater limit can not be changed Change-Id: If25a609e9f9667dc111cb220024388a51df993ec Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/33913 Tested-by: Jenkins Automated Tests Reviewed-by: Markus Zolliker --- frappy_psi/triton.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frappy_psi/triton.py b/frappy_psi/triton.py index 555aa3f1..a457bc15 100644 --- a/frappy_psi/triton.py +++ b/frappy_psi/triton.py @@ -275,9 +275,12 @@ class TemperatureLoop(ScannerChannel, mercury.TemperatureLoop): self.change('SYS:DR:CHAN:%s' % self.system_channel, self.slot.split(',')[0], str) if active: self.change('DEV::TEMP:LOOP:FILT:ENAB', 'ON', str) - if self.output_module: + try: limit = self.output_module.read_limit() + # output_module is an instance of HeaterOutputWithRange self.output_module.write_limit(limit) + except AttributeError: + pass # output_module is None or an instance of HeaterOutput class HeaterOutput(HasInput, MercuryChannel, Writable):