Index: tests/dg_tests.py =================================================================== diff -u -r12a7cb24fdb8f871aa4da49b859e0fef567255b1 -rbddfb595199bfe5d01671d31c218a2f647f6d7d3 --- tests/dg_tests.py (.../dg_tests.py) (revision 12a7cb24fdb8f871aa4da49b859e0fef567255b1) +++ tests/dg_tests.py (.../dg_tests.py) (revision bddfb595199bfe5d01671d31c218a2f647f6d7d3) @@ -501,11 +501,61 @@ f.close() +def run_heat_disinfect(): + complete_counter = 1 + address = os.path.join(os.getcwd(), "heat_disinfect.log") + f = open(address, "w") + # dg.heaters.cmd_heaters_broadcast_interval_override(50) + # sleep(1) + #dg.hd_proxy.cmd_start_stop_dg_heat_disinfect() + dg.hd_proxy.cmd_start_stop_dg_heat_disinfect_active_cool() + + try: + while True: + disinfect = get_heat_disinfect_mode_info() + drain = get_drain_states_info() + load_cell = get_load_cells_info() + valves = get_dg_valves_states() + ro = get_ro_info() + temp = get_temperature_sensors_info() + heaters = get_heaters_info() + uv = get_uv_reactors_info() + dg_fans = get_dg_fans_info() + hd_fans = get_hd_fans_info() + conc = get_concentrate_pumps_info() + + var = disinfect + load_cell + drain + ro + temp + heaters + uv + dg_fans + hd_fans + valves + conc + '\r' + + print(var) + f.write(var) + sleep(1) + + # If the mode came back to standby or standby solo + # if dg.dg_operation_mode == 3 or dg.dg_operation_mode == 4: + # If it is the first call, stop heat disinfect + # if complete_counter == 1: + # dg.hd_proxy.cmd_start_stop_dg_heat_disinfect(start=False) + + # Write a few more complete states to make sure the complete state items are recorded + # elif complete_counter == 3: + # pass + # f.close() + # break + + # complete_counter += 1 + + except KeyboardInterrupt: + dg.hd_proxy.cmd_start_stop_dg_heat_disinfect(start=False) + sleep(0.2) + dg.hd_proxy.cmd_start_stop_dg_heat_disinfect_active_cool(start=False) + f.close() + + def run_chemical_disinfect(): complete_counter = 1 f = open("/home/fw/projects/dialin/tests/chemical_disinfect.log", "w") #dg.hd_proxy.cmd_start_stop_dg_chemical_disinfect() - #dg.hd_proxy.cmd_start_stop_dg_chemical_disinfect_flush() + dg.hd_proxy.cmd_start_stop_dg_chemical_disinfect_flush() try: while True: @@ -669,7 +719,7 @@ #collect_treatment_data() - #run_ro_permeate_sample() + run_ro_permeate_sample() #collect_hd_treatment() @@ -693,8 +743,8 @@ #hd.ui.cmd_set_ro_only_mode_status(1) - while True: - print(dg.switches.dg_switches_status) - sleep(1) + #while True: + # print(dg.switches.dg_switches_status) + # sleep(1)