frappy_psi.hepump: check conn. before reading digital inputs
trinamic: export input3 if available Change-Id: Idacfb92a37ab8a8a5d7bb7502d23a9f3c6d962e7
This commit is contained in:
@@ -41,15 +41,17 @@ class HePump(Writable):
|
||||
self.valvemotor.write_output0(value)
|
||||
|
||||
def read_target(self):
|
||||
return self.valvemotor.read_output0()
|
||||
if self.valvemotor.io.is_connected:
|
||||
return self.valvemotor.read_output0()
|
||||
return self.target
|
||||
|
||||
def read_value(self):
|
||||
if self.has_feedback:
|
||||
if self.has_feedback and self.valvemotor.io.is_connected:
|
||||
return not self.valvemotor.read_input3()
|
||||
return self.target
|
||||
|
||||
def read_eco_mode(self):
|
||||
if self.pump_type == 'xds35':
|
||||
if self.pump_type == 'xds35' and self.valvemotor.io.is_connected:
|
||||
return self.valvemotor.read_output1()
|
||||
return False
|
||||
|
||||
|
||||
@@ -162,7 +162,9 @@ class Motor(PersistentMixin, HasIO, Drivable):
|
||||
if self.has_home:
|
||||
self.parameters['home'].export = '_home'
|
||||
self.setProperty('has_inputs', True)
|
||||
if not self.has_inputs:
|
||||
if self.has_inputs:
|
||||
self.parameters['input3'].export = '_input3'
|
||||
else:
|
||||
self.setProperty('with_pullup', False)
|
||||
|
||||
def writeInitParams(self):
|
||||
|
||||
Reference in New Issue
Block a user