[WIP] further work on CCU4
Change-Id: Icdd6e253f276a5ade44fb4103306160fc348556b
This commit is contained in:
@ -30,16 +30,13 @@ class ValveMotor(Motor):
|
||||
|
||||
class HePump(Writable):
|
||||
valvemotor = Attached(Motor)
|
||||
flow = Attached(NeedleValveFlow)
|
||||
valve = Attached(Writable)
|
||||
value = Parameter(datatype=BoolType())
|
||||
target = Parameter(datatype=BoolType())
|
||||
pump_type = Parameter('pump type', EnumType(no=0, neodry=1, xds35=2, sv65=3), readonly=False, default=0)
|
||||
pump_type = NeedleValveFlow.pump_type
|
||||
eco_mode = Parameter('eco mode', BoolType(), readonly=False)
|
||||
has_feedback = Parameter('feedback works', BoolType(), readonly=False, default=True)
|
||||
|
||||
FLOW_SCALE = {'no': 0, 'neodry': 0.55, 'xds35': 0.6, 'sv65': 0.9}
|
||||
|
||||
def write_target(self, value):
|
||||
self.valvemotor.write_output0(value)
|
||||
|
||||
@ -51,9 +48,6 @@ class HePump(Writable):
|
||||
return not self.valvemotor.read_input3()
|
||||
return self.target
|
||||
|
||||
def write_pump_type(self, value):
|
||||
self.flow.pressure_scale = self.FLOW_SCALE[value.name]
|
||||
|
||||
def read_eco_mode(self):
|
||||
if self.pump_type == 'xds35':
|
||||
return self.valvemotor.read_output1()
|
||||
|
Reference in New Issue
Block a user