Index: dialin/dg/conductivity_sensors.py =================================================================== diff -u -rf0d682b1a3703db6d8c3e0d3597d5b0f8a8c6b9c -r883d2cc00bde741c2ce5b338a413f38b5e87b273 --- dialin/dg/conductivity_sensors.py (.../conductivity_sensors.py) (revision f0d682b1a3703db6d8c3e0d3597d5b0f8a8c6b9c) +++ dialin/dg/conductivity_sensors.py (.../conductivity_sensors.py) (revision 883d2cc00bde741c2ce5b338a413f38b5e87b273) @@ -58,18 +58,18 @@ self.can_interface.register_receiving_publication_function(channel_id, msg_id, self._handler_conductivity_sensors_sync) - self.cpi = 0.0 - self.cpo = 0.0 - self.cd1 = 0.0 - self.cd2 = 0.0 + 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 [self.cpi, self.cpo, self.cd1, self.cd2] + return [self.conductivity_sensor_cpi, self.conductivity_sensor_cpo, self.conductivity_sensor_cd1, self.conductivity_sensor_cd2] @_publish(["conductivity_sensor_cpi", "conductivity_sensor_cpo", "conductivity_sensor_cd1", "conductivity_sensor_cd2"]) def _handler_conductivity_sensors_sync(self, message): @@ -86,10 +86,10 @@ 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.cpi = cpi[0] - self.cpo = cpo[0] - self.cd1 = cd1[0] - self.cd2 = cd2[0] + 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): """ @@ -119,7 +119,7 @@ if reset == RESET: str_res = "reset back to normal" else: - str_res = str(conductivity) + " microsemens/cm" + str_res = str(conductivity) + " microsiemens/cm" print("override conductivity sensor value for sensor " + str(sensor) + ": " + str_res) # Send message