Index: dialin/common/msg_ids.py =================================================================== diff -u -r19ed99efea69f85cf5ea175a39555dfaa8e493e0 -r5b791b3c7d1d2498dbe52c4573225a56afffe2fb --- dialin/common/msg_ids.py (.../msg_ids.py) (revision 19ed99efea69f85cf5ea175a39555dfaa8e493e0) +++ dialin/common/msg_ids.py (.../msg_ids.py) (revision 5b791b3c7d1d2498dbe52c4573225a56afffe2fb) @@ -333,7 +333,7 @@ MSG_ID_DG_ACCEL_SEND_INTERVAL_OVERRIDE = 0XA019 MSG_ID_DG_MONITORED_VOLTAGES_SEND_INTERVAL_OVERRIDE = 0XA01A MSG_ID_DG_MONITORED_VOLTAGES_OVERRIDE = 0XA01B - MSG_ID_DRAIN_PUMP_SET_DELTA_PRESSURE_OVERRIDE = 0XA01C + MSG_ID_DRAIN_PUMP_TARGET_OUTLET_PRESSURE = 0XA01C MSG_ID_DG_SWITCHES_STATUS_OVERRIDE = 0XA01D MSG_ID_DG_SWITCHES_PUBLISH_INTERVAL_OVERRIDE = 0XA01E MSG_ID_DG_OP_MODE_PUBLISH_INTERVAL_OVERRIDE = 0XA01F Index: dialin/dg/events.py =================================================================== diff -u -r6acb9af3aed2505112c51cb7eea41dffaa472286 -r5b791b3c7d1d2498dbe52c4573225a56afffe2fb --- dialin/dg/events.py (.../events.py) (revision 6acb9af3aed2505112c51cb7eea41dffaa472286) +++ dialin/dg/events.py (.../events.py) (revision 5b791b3c7d1d2498dbe52c4573225a56afffe2fb) @@ -101,12 +101,14 @@ else: # Get the all the events complete_list = self._dg_event_dictionary[DGEventList(event_id).name] - # Since the last are located at the end of the list, iterate backwards for the defined # event messages - for i in range(len(complete_list) - 1, number_of_events + 1, -1): + for i in range(len(complete_list) - 1, len(complete_list) - number_of_events - 1, -1): list_of_events.append(complete_list[i]) + if number_of_events == 0: + list_of_events = self._dg_event_dictionary[DGEventList(event_id).name] + return list_of_events @publish(['_dg_event_dictionary']) @@ -210,6 +212,3 @@ # Update event dictionary self._dg_event_dictionary[event_state_name].append(event_tuple) - - -# What is wrong with the events in develop? Index: dialin/dg/ro_pump.py =================================================================== diff -u -r89df6a25e4845ad234c1ffc71fb484b73d125b4c -r5b791b3c7d1d2498dbe52c4573225a56afffe2fb --- dialin/dg/ro_pump.py (.../ro_pump.py) (revision 89df6a25e4845ad234c1ffc71fb484b73d125b4c) +++ dialin/dg/ro_pump.py (.../ro_pump.py) (revision 5b791b3c7d1d2498dbe52c4573225a56afffe2fb) @@ -62,8 +62,6 @@ self.ro_pump_state = 0.0 self.target_flow_lpm = 0.0 - self.temporary_flow_value = 0.0 - def get_target_pressure(self): """ Gets the target pressure @@ -117,10 +115,6 @@ tgt_flow = struct.unpack('f', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_5:MsgFieldPositions.END_POS_FIELD_5]))[0] - temp_current_flow = struct.unpack('f', bytearray( - message['message'][MsgFieldPositions.START_POS_FIELD_6:MsgFieldPositions.END_POS_FIELD_6]))[0] - self.temporary_flow_value = temp_current_flow - self.target_pressure_psi = tgt_pres self.measured_flow_rate_lpm = flow self.pwm_duty_cycle_pct = pwm Index: tests/dg_heat_and_chemical_disinfect_test.py =================================================================== diff -u -r6acb9af3aed2505112c51cb7eea41dffaa472286 -r5b791b3c7d1d2498dbe52c4573225a56afffe2fb --- tests/dg_heat_and_chemical_disinfect_test.py (.../dg_heat_and_chemical_disinfect_test.py) (revision 6acb9af3aed2505112c51cb7eea41dffaa472286) +++ tests/dg_heat_and_chemical_disinfect_test.py (.../dg_heat_and_chemical_disinfect_test.py) (revision 5b791b3c7d1d2498dbe52c4573225a56afffe2fb) @@ -122,10 +122,10 @@ def get_ro_info(): - info = ('RO, {}, PPi, {:5.3f}, PPo, {:5.3f}, PWM, {:5.3f}, Flow, {:5.3f}, Tgt_flow, {:5.3f}, Temp_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.target_flow_lpm, dg.ro_pump.temporary_flow_value)) + dg.ro_pump.measured_flow_rate_lpm, dg.ro_pump.target_flow_lpm)) return info @@ -549,11 +549,11 @@ hd.cmd_log_in_to_hd() sleep(1) - #run_heat_disinfect() + # run_heat_disinfect() # run_chemical_disinfect() - run_dg() + # run_dg() # run_ro_pump_duty_cycles() @@ -563,6 +563,6 @@ # cmd_test_heaters() - #collect_treatment_data() + collect_treatment_data() Index: tests/test_flush.py =================================================================== diff -u -r6acb9af3aed2505112c51cb7eea41dffaa472286 -r5b791b3c7d1d2498dbe52c4573225a56afffe2fb --- tests/test_flush.py (.../test_flush.py) (revision 6acb9af3aed2505112c51cb7eea41dffaa472286) +++ tests/test_flush.py (.../test_flush.py) (revision 5b791b3c7d1d2498dbe52c4573225a56afffe2fb) @@ -27,9 +27,8 @@ info = ('State, {}, Overall_elapsed_time, {}, State_elapsed_time, {}, Drain_vol, {:5.3f}, Top_alarm, {}, Op, {}, ' 'Sub, {}, History, {}, ' .format(dg.flush.flush_state, dg.flush.overall_elapsed_time, dg.flush.state_elapsed_time, - dg.flush.flush_drain_line_volume_l, hd.alarms.alarm_top, dg.events.get_dg_nth_event(1), - dg.events.get_dg_nth_event(2), dg.events.get_dg_events(2, 25))) - return info + dg.flush.flush_drain_line_volume_l, hd.alarms.alarm_top, dg.events.get_dg_events(1, 0), + dg.events.get_dg_nth_event(2), dg.events.get_dg_events(2, 70))) def get_concentrate_pumps_info():