Index: dialin/dg/ro_pump.py =================================================================== diff -u -r46fb3f18ae1a349eeb8bcc56d243618737ae3279 -r050caf9db7ce6896c3eb08eb5415160d935a9f75 --- dialin/dg/ro_pump.py (.../ro_pump.py) (revision 46fb3f18ae1a349eeb8bcc56d243618737ae3279) +++ dialin/dg/ro_pump.py (.../ro_pump.py) (revision 050caf9db7ce6896c3eb08eb5415160d935a9f75) @@ -57,6 +57,7 @@ self.measured_flow_rate_lpm = 0.0 self.pwm_duty_cycle_pct = 0.0 self.ro_pump_state = 0.0 + self.target_flow_lpm = 0.0 def get_target_pressure(self): """ @@ -100,19 +101,22 @@ @return: None """ - tgt = struct.unpack('f', bytearray( + tgt_pres = struct.unpack('f', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_1:MsgFieldPositions.END_POS_FIELD_1]))[0] flow = struct.unpack('f', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_2:MsgFieldPositions.END_POS_FIELD_2]))[0] pwm = struct.unpack('f', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_3:MsgFieldPositions.END_POS_FIELD_3]))[0] ro_state = struct.unpack('i', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_4:MsgFieldPositions.END_POS_FIELD_4]))[0] + tgt_flow = struct.unpack('f', bytearray( + message['message'][MsgFieldPositions.START_POS_FIELD_5:MsgFieldPositions.END_POS_FIELD_5]))[0] - self.target_pressure_psi = tgt + self.target_pressure_psi = tgt_pres self.measured_flow_rate_lpm = flow self.pwm_duty_cycle_pct = pwm self.ro_pump_state = ROPumpStates(ro_state).name if ROPumpStates.has_value(ro_state) else 'State Unknown' + self.target_flow_lpm = tgt_flow def cmd_ro_pump_set_point_override(self, pressure, reset=NO_RESET): """ Index: tests/dg_heat_disinfect_test.py =================================================================== diff -u -r111a7cd39ffa7b39669e7f38fbf3ff6fe9eae3e5 -r050caf9db7ce6896c3eb08eb5415160d935a9f75 --- tests/dg_heat_disinfect_test.py (.../dg_heat_disinfect_test.py) (revision 111a7cd39ffa7b39669e7f38fbf3ff6fe9eae3e5) +++ tests/dg_heat_disinfect_test.py (.../dg_heat_disinfect_test.py) (revision 050caf9db7ce6896c3eb08eb5415160d935a9f75) @@ -84,10 +84,10 @@ def get_ro_info(): - info = ('RO, {}, PPi, {:5.3f}, PPo, {:5.3f}, PWM, {:5.3f}, Flow, {:5.3f}, ' + info = ('RO, {}, PPi, {:5.3f}, PPo, {:5.3f}, PWM, {:5.3f}, Flow, {:5.3f}, Tgt_flow, {:5.3f}, ' .format(dg.ro_pump.ro_pump_state, dg.pressures.ro_pump_inlet_pressure, dg.pressures.ro_pump_outlet_pressure, dg.ro_pump.pwm_duty_cycle_pct, - dg.ro_pump.measured_flow_rate_lpm)) + dg.ro_pump.measured_flow_rate_lpm, dg.ro_pump.target_flow_lpm)) return info @@ -174,7 +174,7 @@ complete_counter += 1 except KeyboardInterrupt: - dg.hd_proxy.cmd_start_stop_heat_disinfect(start=False) + #dg.hd_proxy.cmd_start_stop_heat_disinfect(start=False) f.close()