Index: dialin/dg/conductivity_sensors.py =================================================================== diff -u -r883d2cc00bde741c2ce5b338a413f38b5e87b273 -r2adaaf1a16c352da0448b929f853f68b08249cf0 --- dialin/dg/conductivity_sensors.py (.../conductivity_sensors.py) (revision 883d2cc00bde741c2ce5b338a413f38b5e87b273) +++ dialin/dg/conductivity_sensors.py (.../conductivity_sensors.py) (revision 2adaaf1a16c352da0448b929f853f68b08249cf0) @@ -38,10 +38,6 @@ END_POS_CS_CPI = START_POS_CS_CPI + 4 START_POS_CS_CPO = END_POS_CS_CPI END_POS_CS_CPO = START_POS_CS_CPO + 4 - START_POS_CS_CD1 = END_POS_CS_CPO - END_POS_CS_CD1 = START_POS_CS_CD1 + 4 - START_POS_CS_CD2 = END_POS_CS_CD1 - END_POS_CS_CD2 = START_POS_CS_CD2 + 4 def __init__(self, can_interface=None): """ @@ -60,18 +56,16 @@ self.conductivity_sensor_cpi = 0.0 self.conductivity_sensor_cpo = 0.0 - self.conductivity_sensor_cd1 = 0.0 - self.conductivity_sensor_cd2 = 0.0 def get_conductivity_sensors(self): """ Gets the current conductivity value - @return: List containing conductivity values: [CPI, CPO, CD1, CD2] + @return: List containing conductivity values: [ conductivity_sensor_cpi, conductivity_sensor_cpo ] """ - return [self.conductivity_sensor_cpi, self.conductivity_sensor_cpo, self.conductivity_sensor_cd1, self.conductivity_sensor_cd2] + return [self.conductivity_sensor_cpi, self.conductivity_sensor_cpo] - @_publish(["conductivity_sensor_cpi", "conductivity_sensor_cpo", "conductivity_sensor_cd1", "conductivity_sensor_cd2"]) + @_publish(["conductivity_sensor_cpi", "conductivity_sensor_cpo"]) def _handler_conductivity_sensors_sync(self, message): """ Handles published conductivity sensor data messages. Conductivity sensor data are captured @@ -83,13 +77,9 @@ cpi = struct.unpack('f', bytearray(message['message'][self.START_POS_CS_CPI:self.END_POS_CS_CPI])) cpo = struct.unpack('f', bytearray(message['message'][self.START_POS_CS_CPO:self.END_POS_CS_CPO])) - cd1 = struct.unpack('f', bytearray(message['message'][self.START_POS_CS_CD1:self.END_POS_CS_CD1])) - cd2 = struct.unpack('f', bytearray(message['message'][self.START_POS_CS_CD2:self.END_POS_CS_CD2])) self.conductivity_sensor_cpi = cpi[0] self.conductivity_sensor_cpo = cpo[0] - self.conductivity_sensor_cd1 = cd1[0] - self.conductivity_sensor_cd2 = cd2[0] def cmd_conductivity_sensor_override(self, conductivity, sensor, reset=NO_RESET): """ @@ -103,8 +93,6 @@ Conductivity sensor IDs: \n 0 = CPI \n 1 = CPO \n - 2 = CD1 \n - 3 = CD2 \n """ rst = integer_to_bytearray(reset)