Index: tests/dg_tests.py =================================================================== diff -u -r4c63e5617400d2246d2e0290a9c63da4defbb2fc -r6c9c54b00503ff8124ba864ec846d1866e58b8b7 --- tests/dg_tests.py (.../dg_tests.py) (revision 4c63e5617400d2246d2e0290a9c63da4defbb2fc) +++ tests/dg_tests.py (.../dg_tests.py) (revision 6c9c54b00503ff8124ba864ec846d1866e58b8b7) @@ -171,11 +171,12 @@ def get_ro_info(): info = ('RO, {}, PPi, {:5.3f}, PPo, {:5.3f}, PWM, {:5.3f}, Flow, {:5.3f}, Tgt_flow, {:5.3f}, Dia_flow, {:5.3f}, ' - 'Feedback_PWM, {:5.3f}, flow_with_conc_pumps, {:5.3f}, ' + 'Feedback_PWM, {:5.3f}, Flow_with_conc_pumps, {:5.3f}, Dialysate_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.dialysate_flow_sensor.flow_rate, - dg.ro_pump.feedback_duty_cycle_pct, dg.ro_pump.measured_raw_flow_rate_with_conc_pumps_mlp)) + dg.ro_pump.feedback_duty_cycle_pct, dg.ro_pump.measured_raw_flow_rate_with_conc_pumps_mlp, + dg.dialysate_flow_sensor.flow_rate)) return info @@ -191,14 +192,14 @@ def get_heaters_info(): info = ('Pri_main_DC, {:5.3f}, Pri_state, {}, Trimmer_DC, {:5.3f}, Trimmer_state, {}, ' 'Primary_target_temp, {:5.3f}, Trimmer_target_temp, {:5.3f}, Primary_eff, {:5.3f}, ' - 'Primary_calc_temp, {:5.3f}, Trimmer_calc_temp, {:5.3f}, Primary_volt, {:5.3f}, Trimmer_volt, {:5.3f}, '. - format(dg.heaters.main_primary_heater_duty_cycle, dg.heaters.primary_heater_state, - dg.heaters.trimmer_heater_duty_cycle, dg.heaters.trimmer_heater_state, - dg.heaters.primary_heaters_target_temperature, dg.heaters.trimmer_heater_target_temperature, - dg.heaters.primary_efficiency, dg.heaters.primary_heaters_target_temperature, - dg.heaters.trimmer_calc_target_temperature, - dg.voltages.monitored_voltages[DGMonitoredVoltages.MONITORED_LINE_24V_PRIM_HTR_V.value], - dg.voltages.monitored_voltages[DGMonitoredVoltages.MONITORED_LINE_24V_TRIM_HTR_V.value])) + 'Primary_calc_temp, {:5.3f}, Trimmer_calc_temp, {:5.3f}, Primary_volt, {:5.3f}, Trimmer_volt, {:5.3f}, ' + .format(dg.heaters.main_primary_heater_duty_cycle, dg.heaters.primary_heater_state, + dg.heaters.trimmer_heater_duty_cycle, dg.heaters.trimmer_heater_state, + dg.heaters.primary_heaters_target_temperature, dg.heaters.trimmer_heater_target_temperature, + dg.heaters.primary_efficiency, dg.heaters.primary_heaters_target_temperature, + dg.heaters.trimmer_calc_target_temperature, + dg.voltages.monitored_voltages[DGMonitoredVoltages.MONITORED_LINE_24V_PRIM_HTR_V.value], + dg.voltages.monitored_voltages[DGMonitoredVoltages.MONITORED_LINE_24V_TRIM_HTR_V.value])) return info @@ -312,9 +313,9 @@ f = open("/home/fw/projects/dialin/tests/run_dg.log", "w") dg.hd_proxy.cmd_start_stop_dg() - sleep(0.1) + sleep(1) - dg.hd_proxy.cmd_switch_reservoirs(reservoir_id=1) + dg.heaters.cmd_start_stop_primary_heater() sleep(0.1) try: @@ -376,7 +377,12 @@ counter = 1 start = False + sleep_time = 1 + #dg.heaters.cmd_heaters_broadcast_interval_override(50) + #sleep(1) + #dg.voltages.cmd_monitored_voltages_broadcast_interval_override(50) + try: while True: hd_run = get_hd_run_info() @@ -422,7 +428,7 @@ """ print(var) f.write(var) - sleep(1) + sleep(sleep_time) except KeyboardInterrupt: dg.hd_proxy.cmd_start_stop_dg(start=False) f.close() @@ -623,7 +629,7 @@ # run_chemical_disinfect() - # run_dg() + #run_dg() # cmd_set_disinfect_ui_screen()