Index: dialin/common/msg_ids.py =================================================================== diff -u -r889854fedb9ee0711460f6addd9b79e0a5ece718 -r685c0317a3c9ceb0aea35774cbc4511f3ae9fb33 --- dialin/common/msg_ids.py (.../msg_ids.py) (revision 889854fedb9ee0711460f6addd9b79e0a5ece718) +++ dialin/common/msg_ids.py (.../msg_ids.py) (revision 685c0317a3c9ceb0aea35774cbc4511f3ae9fb33) @@ -351,7 +351,7 @@ MSG_ID_PRESSURE_OVERRIDE = 0xA006 MSG_ID_PRESSURE_SEND_INTERVAL_OVERRIDE = 0xA007 MSG_ID_DG_HD_COMMUNICATION_STATUS_OVERRIDE = 0xA008 - MSG_ID_RO_MEASURED_FLOW_OVERRIDE = 0xA009 + MSG_ID_DG_SET_PRIMARY_AND_TRIMMER_HEATERS_TARGET_TEMP = 0xA009 MSG_ID_RO_PUMP_SEND_INTERVAL_OVERRIDE = 0xA00A MSG_ID_DRAIN_PUMP_SET_RPM = 0xA00B MSG_ID_DRAIN_PUMP_SEND_INTERVAL_OVERRIDE = 0xA00C Index: dialin/dg/heaters.py =================================================================== diff -u -r5eb006b08eb1d7b641b22fff20072ab7b685cfec -r685c0317a3c9ceb0aea35774cbc4511f3ae9fb33 --- dialin/dg/heaters.py (.../heaters.py) (revision 5eb006b08eb1d7b641b22fff20072ab7b685cfec) +++ dialin/dg/heaters.py (.../heaters.py) (revision 685c0317a3c9ceb0aea35774cbc4511f3ae9fb33) @@ -210,6 +210,26 @@ trimmer_target_temp)) self.can_interface.send(message, 0) + def cmd_set_primary_and_trimmer_heaters_target_temperature(self, + primary_target_temp: float = 37.0, + trimmer_target_temp: float = 38.0) -> None: + """ + Constructs and sends primary and trimmer heater target temperature + + @param primary_target_temp: (float) Primary heater target temperature + @param trimmer_target_temp: (float) Trimmer heater target temperature + @returns none + """ + primary_target = float_to_bytearray(primary_target_temp) + trimmer_target = float_to_bytearray(trimmer_target_temp) + payload = primary_target + trimmer_target + message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_dg_ch_id, + message_id=MsgIds.MSG_ID_DG_SET_PRIMARY_AND_TRIMMER_HEATERS_TARGET_TEMP.value, + payload=payload) + self.logger.debug("Setting Primary Heater to {} C and Trimmer Heater to {} C".format(primary_target_temp, + trimmer_target_temp)) + self.can_interface.send(message, 0) + def cmd_heaters_broadcast_interval_override(self, ms: int, reset: int = NO_RESET) -> int: """ Constructs and sends broadcast time interval. Index: tests/dg_nvm_scripts.py =================================================================== diff -u -rd26df54d17cf3f84471ba2a15e031b6a4f1f04f7 -r685c0317a3c9ceb0aea35774cbc4511f3ae9fb33 --- tests/dg_nvm_scripts.py (.../dg_nvm_scripts.py) (revision d26df54d17cf3f84471ba2a15e031b6a4f1f04f7) +++ tests/dg_nvm_scripts.py (.../dg_nvm_scripts.py) (revision 685c0317a3c9ceb0aea35774cbc4511f3ae9fb33) @@ -27,12 +27,12 @@ # It creates a folder called DG_NV_Records in the destination that is called # If no address is provided, the default location is one folder above the dialin folder wherever it is installed # in your computer. - #dg.sw_configs.cmd_get_dg_sw_config_record() + dg.sw_configs.cmd_get_dg_sw_config_record() # Use cmd_set_dg_sw_config_record() set the changes back to firmware # This function requires an address for the excel report. Use the absolute address of your excel report like the # example below - dg.sw_configs.cmd_update_dg_sw_config_record('/home/fw/projects/DG_NV_Records/2022-10-09-DG-SW-CONFIGS-Record.xlsx') + #dg.sw_configs.cmd_update_dg_sw_config_record('/home/fw/projects/DG_NV_Records/2022-10-09-DG-SW-CONFIGS-Record.xlsx') # Use this function to reset the configuration records to all be 0 #dg.sw_configs.cmd_reset_dg_sw_config_record() @@ -83,9 +83,9 @@ if dg.cmd_log_in_to_dg(): - run_sw_configs_commands() + #run_sw_configs_commands() - #run_calibration_commands() + run_calibration_commands() #run_system_commands() Index: tests/dg_tests.py =================================================================== diff -u -r889854fedb9ee0711460f6addd9b79e0a5ece718 -r685c0317a3c9ceb0aea35774cbc4511f3ae9fb33 --- tests/dg_tests.py (.../dg_tests.py) (revision 889854fedb9ee0711460f6addd9b79e0a5ece718) +++ tests/dg_tests.py (.../dg_tests.py) (revision 685c0317a3c9ceb0aea35774cbc4511f3ae9fb33) @@ -29,7 +29,7 @@ from dialin.hd.temperatures import HDTemperaturesNames from dialin.dg.concentrate_pumps import DGConcentratePumpsStates from dialin.dg.uv_reactors import ReactorsNames -from dialin.common.hd_defs import HDOpModes, HDOpSubModes, PreTreatmentWetSelfTestStates, PostTreatmentStates +from dialin.common.hd_defs import HDOpModes, HDStandbyStates, PreTreatmentWetSelfTestStates, PostTreatmentStates from dialin.hd.post_treatment import HDPostTreatmentDrainStates from dialin.common.dg_defs import DGEventList from dialin.common.hd_defs import HDEventList @@ -689,7 +689,7 @@ hd.cmd_log_in_to_hd() sleep(1) - run_heat_disinfect() + #run_heat_disinfect() #run_flush_mode() @@ -699,7 +699,7 @@ # cmd_set_disinfect_ui_screen() - #collect_treatment_data() + collect_treatment_data() #collect_hd_treatment() @@ -735,3 +735,5 @@ # print(get_ro_info()) # sleep(1) + #dg.heaters.cmd_set_primary_and_trimmer_heaters_target_temperature(primary_target_temp=40, trimmer_target_temp=52) + Index: tests/hd_blood_leak_data.py =================================================================== diff -u -r2bf8526a561896d59ec4a2b26dcae2fe30dba16e -r685c0317a3c9ceb0aea35774cbc4511f3ae9fb33 --- tests/hd_blood_leak_data.py (.../hd_blood_leak_data.py) (revision 2bf8526a561896d59ec4a2b26dcae2fe30dba16e) +++ tests/hd_blood_leak_data.py (.../hd_blood_leak_data.py) (revision 685c0317a3c9ceb0aea35774cbc4511f3ae9fb33) @@ -74,10 +74,10 @@ #print(hd.blood_leak.get_blood_leak_emb_mode_command_response()) - #hd.blood_leak.cmd_blood_leak_set_embedded_mode_command(EmbModeCommands.G.value, msg_payload=0) - #print(hd.blood_leak.get_blood_leak_emb_mode_command_response()) + hd.blood_leak.cmd_blood_leak_set_embedded_mode_command(EmbModeCommands.D.value, msg_payload=0) + print(hd.blood_leak.get_blood_leak_emb_mode_command_response()) - hd.blood_leak.cmd_blood_leak_zero_request() + #hd.blood_leak.cmd_blood_leak_zero_request() while True: Index: tests/hd_nvm_scripts.py =================================================================== diff -u -r6bde876d2212e609b4044f810767136e5243645c -r685c0317a3c9ceb0aea35774cbc4511f3ae9fb33 --- tests/hd_nvm_scripts.py (.../hd_nvm_scripts.py) (revision 6bde876d2212e609b4044f810767136e5243645c) +++ tests/hd_nvm_scripts.py (.../hd_nvm_scripts.py) (revision 685c0317a3c9ceb0aea35774cbc4511f3ae9fb33) @@ -50,12 +50,12 @@ # It creates a folder called HD_NV_Records in the destination that is called # If no address is provided, the default location is one folder above the dialin folder wherever it is installed # in your computer. - hd.calibration_record.cmd_get_hd_calibration_record_report() + #hd.calibration_record.cmd_get_hd_calibration_record_report() # Use cmd_set_hd_calibration_excel_to_fw() set the changes back to firmware # This function requires an address for the excel report. Use the absolute address of your excel report like the # example below - #hd.calibration_record.cmd_set_hd_calibration_excel_to_fw('/home/fw/projects/HD_NV_Records/2022-08-13-HD-Record.xlsx') + hd.calibration_record.cmd_set_hd_calibration_excel_to_fw('/home/fw/projects/HD_NV_Records/2022-08-13-HD-Record.xlsx') # For resetting the calibration record to benign values, use the function below #hd.calibration_record.cmd_reset_hd_calibration_record() @@ -69,9 +69,9 @@ # It creates a folder called DG_NV_Records in the destination that is called # If no address is provided, the default location is one folder above the dialin folder wherever it is installed # in you computer. - hd.system_record.cmd_get_hd_system_record_report() + #hd.system_record.cmd_get_hd_system_record_report() - #hd.system_record.cmd_set_hd_system_record_excel_to_fw('/home/fw/projects/HD_NV_Records/2022-09-26-HD-Record.xlsx') + hd.system_record.cmd_set_hd_system_record_excel_to_fw('/home/fw/projects/HD_NV_Records/2022-09-26-HD-Record.xlsx') # For resetting the system record to benign values, use the function below #hd.system_record.cmd_reset_hd_system_record() Index: tests/peter/set_RTCs.py =================================================================== diff -u -r92cb274e8d2c3cf2f7541735dd7d682d2c8f01c9 -r685c0317a3c9ceb0aea35774cbc4511f3ae9fb33 --- tests/peter/set_RTCs.py (.../set_RTCs.py) (revision 92cb274e8d2c3cf2f7541735dd7d682d2c8f01c9) +++ tests/peter/set_RTCs.py (.../set_RTCs.py) (revision 685c0317a3c9ceb0aea35774cbc4511f3ae9fb33) @@ -29,7 +29,7 @@ current_time_stamp = time() current_time = localtime(current_time_stamp) print(current_time) - """ + if hd.cmd_log_in_to_hd(): hd.rtc.cmd_set_rtc_time_and_date(current_time.tm_sec, current_time.tm_min, @@ -48,5 +48,5 @@ current_time.tm_mon, current_time.tm_year) print("Successfully set DG rtc") + """ -