qnw: WARN status when control is off

Change-Id: Ic91607658b4c0f3a622ad7307aa55d927c82914b
This commit is contained in:
zolliker 2023-03-06 14:05:01 +01:00
parent 908f2d4c23
commit 05415e79b1

View File

@ -21,7 +21,7 @@
from frappy.core import Readable, Parameter, FloatRange, IDLE, ERROR, BoolType,\ from frappy.core import Readable, Parameter, FloatRange, IDLE, ERROR, BoolType,\
StringIO, HasIO, Property, Writable, Drivable, BUSY, StringType, Done StringIO, HasIO, Property, WARN, Drivable, BUSY, StringType, Done
from frappy.errors import InternalError from frappy.errors import InternalError
@ -93,10 +93,13 @@ class TemperatureLoopTC1(SensorTC1, Drivable):
if reply[4] == '+': if reply[4] == '+':
return BUSY, 'ramping' return BUSY, 'ramping'
if reply[3] == 'C': if reply[3] == 'C':
if self.ramp_used: if self.control:
return BUSY, 'stabilizing' if self.ramp_used:
return BUSY, 'changing' return BUSY, 'stabilizing'
return IDLE, '' return BUSY, 'changing'
if self.control:
return IDLE, ''
return WARN, 'control off'
def write_target(self, target): def write_target(self, target):
if self.ramp_used: if self.ramp_used: