Index: dialin/dg/switches.py =================================================================== diff -u -r5a634c567871a6855667341464bac9e057cd2b93 -r2011b5c06793fc8e98f9e43113b15cff016024a1 --- dialin/dg/switches.py (.../switches.py) (revision 5a634c567871a6855667341464bac9e057cd2b93) +++ dialin/dg/switches.py (.../switches.py) (revision 2011b5c06793fc8e98f9e43113b15cff016024a1) @@ -71,9 +71,9 @@ fluid_door = struct.unpack('i', bytearray( message['message'][MsgFieldPositions.START_POS_FIELD_3:MsgFieldPositions.END_POS_FIELD_3]))[0] - self.dg_switches_status[DGSwitchesName.CONCENTRATE_CAP.name] = DGSwitchStatus(conc_cap).value - self.dg_switches_status[DGSwitchesName.DIALYSATE_CAP.name] = DGSwitchStatus(dialysate_cap).value - self.dg_switches_status[DGSwitchesName.FLUID_DOOR.name] = DGSwitchStatus(fluid_door).value + #self.dg_switches_status[DGSwitchesName.CONCENTRATE_CAP.name] = DGSwitchStatus(conc_cap).value + #self.dg_switches_status[DGSwitchesName.DIALYSATE_CAP.name] = DGSwitchStatus(dialysate_cap).value + #self.dg_switches_status[DGSwitchesName.FLUID_DOOR.name] = DGSwitchStatus(fluid_door).value def cmd_dg_switch_status_override(self, switch: int, status: int, reset: int = NO_RESET) -> int: """ Index: tests/dg_heat_and_chemical_disinfect_test.py =================================================================== diff -u -rd9310e1930f9237650263dcad07f676439468b50 -r2011b5c06793fc8e98f9e43113b15cff016024a1 --- tests/dg_heat_and_chemical_disinfect_test.py (.../dg_heat_and_chemical_disinfect_test.py) (revision d9310e1930f9237650263dcad07f676439468b50) +++ tests/dg_heat_and_chemical_disinfect_test.py (.../dg_heat_and_chemical_disinfect_test.py) (revision 2011b5c06793fc8e98f9e43113b15cff016024a1) @@ -288,7 +288,7 @@ print(var) f.write(var) - if run_number > 5 and dg.dg_operation_sub_mode == 2: + if run_number > 7 and dg.dg_operation_sub_mode == 2: dg.hd_proxy.cmd_start_stop_dg(start=False) f.close() break @@ -528,9 +528,9 @@ #run_chemical_disinfect() - #run_dg() + run_dg() - run_ro_pump_duty_cycles() + #run_ro_pump_duty_cycles() #cmd_set_disinfect_ui_screen() Index: tests/flow_sensor_data_processor.py =================================================================== diff -u -rd9310e1930f9237650263dcad07f676439468b50 -r2011b5c06793fc8e98f9e43113b15cff016024a1 --- tests/flow_sensor_data_processor.py (.../flow_sensor_data_processor.py) (revision d9310e1930f9237650263dcad07f676439468b50) +++ tests/flow_sensor_data_processor.py (.../flow_sensor_data_processor.py) (revision 2011b5c06793fc8e98f9e43113b15cff016024a1) @@ -1,10 +1,15 @@ import math import os +from time import time +start_time = time() + +# This is the address that all the flow log files are located log_files_address = '/home/fw/Desktop/Users/DaraN/Flow Sensor Data' write_file = '/home/fw/Desktop/Users/DaraN/Flow Sensor Data/flow_results.csv' + # Check if the report file exists. If it does, remove it first if os.path.exists(write_file): os.remove(write_file) @@ -32,6 +37,7 @@ file_name = os.path.splitext(log_file)[0] # Remove all the addresses before the file name (i.e. home/folder/run_pump will be run_pump) file_name = file_name.split('/')[-1] + print(file_name) # Add the header to the run w.write(file_name + '\r') @@ -84,10 +90,13 @@ flow, avg_measured_flow, load_cell_flow, error)) w.write(info + '\r') - print(info) + # Done with this calculations, reset all the variables for the next fill initial_fill_time = 0 initial_fill_load_cell = 0 is_it_fill_time = False flow_running_sum = 0 initial_fill_delay = 0 + +elapsed_time = ('Elapsed Time: {} seconds!'.format(int(time() - start_time))) +print(elapsed_time) Index: tests/peter/test_dg_records.py =================================================================== diff -u -r6b5600f056eff25cbb365fa6a5eefc4f5fad9360 -r2011b5c06793fc8e98f9e43113b15cff016024a1 --- tests/peter/test_dg_records.py (.../test_dg_records.py) (revision 6b5600f056eff25cbb365fa6a5eefc4f5fad9360) +++ tests/peter/test_dg_records.py (.../test_dg_records.py) (revision 2011b5c06793fc8e98f9e43113b15cff016024a1) @@ -168,6 +168,12 @@ print(dg.calibration_record.dg_calibration_record) + dg.calibration_record.dg_calibration_record['flow_sensors']['flow_sensor']['offset'][1] = 0.011 + dg.calibration_record.dg_calibration_record['flow_sensors']['flow_sensor']["cal_time"][1] = \ + NVOpsUtils.get_current_time_in_epoch() + dg.calibration_record.dg_calibration_record['flow_sensors']['flow_sensor']["crc"][1] = \ + NVOpsUtils.get_group_record_crc(dg.calibration_record.dg_calibration_record['flow_sensors']['flow_sensor']) + """ # Change the value(s) you are planning to change directly to the dictionary dg.calibration_record.dg_calibration_record["pressure_sensors"]["ppi"]["fourth_order"][1] = 0.0 @@ -189,7 +195,7 @@ dg.calibration_record.dg_calibration_record["load_cells"]["load_cell_a1"]["crc"][1] = \ NVOpsUtils.get_group_record_crc(dg.calibration_record.dg_calibration_record["load_cells"]["load_cell_a1"]) """ - #dg.calibration_record.cmd_set_dg_calibration_record(dg.calibration_record.dg_calibration_record) + dg.calibration_record.cmd_set_dg_calibration_record(dg.calibration_record.dg_calibration_record) print(dg.calibration_record.dg_calibration_record) @@ -268,8 +274,8 @@ if __name__ == "__main__": - test_dg_reset_record() - #test_dg_calibration_record() + #test_dg_reset_record() + test_dg_calibration_record() # test_dg_service_record() #test_dg_system_record() # test_dg_scheduled_runs_record()