Index: dialin/common/msg_defs.py =================================================================== diff -u -rd55580ac0bef4e0c16ad6c6d9d0cff409ec67027 -r165a814489f7d0e91655b8861d4a4acac3d57f51 --- dialin/common/msg_defs.py (.../msg_defs.py) (revision d55580ac0bef4e0c16ad6c6d9d0cff409ec67027) +++ dialin/common/msg_defs.py (.../msg_defs.py) (revision 165a814489f7d0e91655b8861d4a4acac3d57f51) @@ -97,7 +97,6 @@ MsgIds.MSG_ID_DG_SWITCHES_DATA.value, MsgIds.MSG_ID_HD_SWITCHES_DATA.value, MsgIds.MSG_ID_HD_FANS_DATA.value, - MsgIds.MSG_ID_DG_DIALYSATE_FLOW_METER_DATA.value, MsgIds.MSG_ID_DG_ALARM_INFO.value, MsgIds.MSG_ID_HD_RESERVOIRS_DATA.value ] Index: dialin/common/msg_ids.py =================================================================== diff -u -rf0cb1f298e3960769e0133172769deb9afe5a393 -r165a814489f7d0e91655b8861d4a4acac3d57f51 --- dialin/common/msg_ids.py (.../msg_ids.py) (revision f0cb1f298e3960769e0133172769deb9afe5a393) +++ dialin/common/msg_ids.py (.../msg_ids.py) (revision 165a814489f7d0e91655b8861d4a4acac3d57f51) @@ -186,13 +186,13 @@ MSG_ID_HD_FANS_DATA = 0xA3 MSG_ID_HD_EVENT = 0xA4 MSG_ID_DG_EVENT = 0xA5 - MSG_ID_DG_DIALYSATE_FLOW_METER_DATA = 0xA6 + MSG_ID_HD_SET_SERVICE_TIME = 0xA6 MSG_ID_DG_ALARM_INFO = 0xA7 MSG_ID_HD_RESERVOIRS_DATA = 0xA8 MSG_ID_HD_REQUEST_DG_CONCENTRATE_MIXING_RATIOS = 0xA9 MSG_ID_DG_CONCENTRATE_MIXING_RATIOS_DATA = 0xAA MSG_ID_DG_SCHEDULED_RUNS_DATA = 0xAB - MSG_ID_DG_SCHEDULED_RUNS_INFO = 0xAC + MSG_ID_DG_SET_SERVICE_TIME = 0xAC MSG_ID_UI_INSTALLATION_CONFIRM_RESPONSE = 0xAD MSG_ID_DG_FILL_MODE_DATA = 0xAE MSG_ID_DG_BAD_FILL_SUB_STATE = 0xAF @@ -303,7 +303,7 @@ MSG_ID_HD_BUBBLE_STATUS_OVERRIDE = 0x805E MSG_ID_HD_BLOOD_PRIME_VOLUME_OVERRIDE = 0x805F MSG_ID_HD_BUBBLE_SELF_TEST_REQUEST = 0x8060 - MSG_ID_HD_FAN_RPM_ALARM_START_TIME_OFFSET_OVERRIDE = 0x8061 + MSG_ID_HD_NV_RECORD_CRC_OVERRIDE = 0x8061 MSG_ID_HD_SWITCHES_STATUS_OVERRIDE = 0x8062 MSG_ID_HD_SWITCHES_PUBLISH_INTERVAL_OVERRIDE = 0x8063 MSG_ID_HD_BATTERY_REMAINING_PERCENT_OVERRIDE = 0x8064 @@ -432,6 +432,7 @@ MSG_ID_DG_CPLD_PUBLISH_INTERVAL_OVERRIDE = 0xA058 MSG_ID_DG_DRAIN_PUMP_CURRENT_OVERRIDE = 0xA059 MSG_ID_DG_DRAIN_PUMP_DIRECTION_OVERRIDE = 0xA05A + MSG_ID_DG_NV_RECORD_CRC_OVERRIDE = 0xA05B MSG_ID_HD_DEBUG_EVENT = 0xFFF1 MSG_ID_DG_DEBUG_EVENT = 0xFFF2 Index: dialin/dg/service_record.py =================================================================== diff -u -rcd79d9df6686d5aa1f71ad4789a7c372ddcff370 -r165a814489f7d0e91655b8861d4a4acac3d57f51 --- dialin/dg/service_record.py (.../service_record.py) (revision cd79d9df6686d5aa1f71ad4789a7c372ddcff370) +++ dialin/dg/service_record.py (.../service_record.py) (revision 165a814489f7d0e91655b8861d4a4acac3d57f51) @@ -243,8 +243,9 @@ groups_byte_size = 0 service_records = OrderedDict({'service_record': {'service_location': [' None: + """ + Constructs and sends a ui message to set the HD service time + + @return: none + """ + + message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_hd_ch_id, + message_id=MsgIds.MSG_ID_HD_SET_SERVICE_TIME.value) + + self.logger.debug("Setting HD service time.") + self.can_interface.send(message, 0) + + def cmd_ui_set_dg_service_time(self) -> None: + """ + Constructs and sends a ui message to set the DG service time + + @return: none + """ + + message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_dg_ch_id, + message_id=MsgIds.MSG_ID_DG_SET_SERVICE_TIME.value) + + self.logger.debug("Setting DG service time.") + self.can_interface.send(message, 0) + @publish(["disinfects_hd_submode", "disinfects_dg_mode"]) def _handler_disinfects_data_publish(self, message: dict) -> None: """ Index: dialin/hd/usage_info_record.py =================================================================== diff -u -rcd79d9df6686d5aa1f71ad4789a7c372ddcff370 -r165a814489f7d0e91655b8861d4a4acac3d57f51 --- dialin/hd/usage_info_record.py (.../usage_info_record.py) (revision cd79d9df6686d5aa1f71ad4789a7c372ddcff370) +++ dialin/hd/usage_info_record.py (.../usage_info_record.py) (revision 165a814489f7d0e91655b8861d4a4acac3d57f51) @@ -28,7 +28,7 @@ class HDUsageNVRecord(AbstractSubSystem): """ - @brief Hemodialysis Device (HD) Dialin API sub-class for for setting and getting the usage information record. + @brief Hemodialysis Device (HD) Dialin API sub-class for setting and getting the usage information record. """ _DEFAULT_USAGE_INFO_VALUE = 0 @@ -266,7 +266,6 @@ # Wait until data has been received from firmware while not observer.received: sleep(0.1) - print(self.hd_usage_info_record) # Write the updated values from excel to firmware self._utilities.write_fw_record_to_excel(self.hd_usage_info_record) Index: tests/dg_nvm_scripts.py =================================================================== diff -u -rcd79d9df6686d5aa1f71ad4789a7c372ddcff370 -r165a814489f7d0e91655b8861d4a4acac3d57f51 --- tests/dg_nvm_scripts.py (.../dg_nvm_scripts.py) (revision cd79d9df6686d5aa1f71ad4789a7c372ddcff370) +++ tests/dg_nvm_scripts.py (.../dg_nvm_scripts.py) (revision 165a814489f7d0e91655b8861d4a4acac3d57f51) @@ -32,7 +32,7 @@ # 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/102353-001-03 Configuration, Soft Settings, DG.xlsx') + dg.sw_configs.cmd_update_dg_sw_config_record('/home/fw/projects/DG_NV_Records/2022-11-29-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() @@ -54,7 +54,7 @@ # Use cmd_set_dg_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 - dg.calibration_record.cmd_set_dg_calibration_excel_to_fw('/home/fw/projects/DG_NV_Records/2022-10-06-DG-Record_betadvt2.xlsx') + #dg.calibration_record.cmd_set_dg_calibration_excel_to_fw('/home/fw/projects/DG_NV_Records/2022-10-06-DG-Record_betadvt2.xlsx') # For resetting the calibration record to benign values, use the function below #dg.calibration_record.cmd_reset_dg_calibration_record() @@ -86,9 +86,9 @@ # in your computer. dg.usage_record.cmd_get_dg_usage_info_record() - dg.usage_record.cmd_set_dg_usage_info_excel_to_fw('/home/fw/projects/DG_NV_Records/2022-09-26-DG-Record.xlsx') + #dg.usage_record.cmd_set_dg_usage_info_excel_to_fw('/home/fw/projects/DG_NV_Records/2022-12-07-DG-Record.xlsx') - dg.usage_record.cmd_reset_dg_usage_info_record() + #dg.usage_record.cmd_reset_dg_usage_info_record() def run_service_commands(): @@ -101,9 +101,9 @@ # in your computer. dg.service_record.cmd_get_dg_service_record() - dg.service_record.cmd_set_dg_service_record_excel_to_fw('/home/fw/projects/DG_NV_Records/2022-09-26-DG-Record.xlsx') + #dg.service_record.cmd_set_dg_service_record_excel_to_fw('/home/fw/projects/DG_NV_Records/2022-12-07-DG-Record.xlsx') - dg.service_record.cmd_reset_dg_service_record() + #dg.service_record.cmd_reset_dg_service_record() if __name__ == "__main__": Index: tests/dg_tests.py =================================================================== diff -u -r3ebf82ed05a35a2ee9f38f0f0dc1541aeaa09e04 -r165a814489f7d0e91655b8861d4a4acac3d57f51 --- tests/dg_tests.py (.../dg_tests.py) (revision 3ebf82ed05a35a2ee9f38f0f0dc1541aeaa09e04) +++ tests/dg_tests.py (.../dg_tests.py) (revision 165a814489f7d0e91655b8861d4a4acac3d57f51) @@ -703,7 +703,7 @@ # cmd_set_disinfect_ui_screen() - collect_treatment_data() + #collect_treatment_data() #collect_hd_treatment() @@ -727,20 +727,6 @@ #test_hd_valves() - #while True: - # print(get_heaters_info()) - # sleep(1) + hd.ui.cmd_ui_set_dg_service_time() - #dg.flow_sensors.cmd_measured_flow_sensor_value_lpm_override(1, 0.8, reset=1) - #dg.heaters.cmd_set_primary_and_trimmer_heaters_target_temperature(primary_target_temp=40, trimmer_target_temp=52) - #sleep(1) - #dg.heaters.cmd_start_stop_trimmer_heater(0) - - #dg.valves.cmd_valve_sensed_state_override(4, 1, reset=0) - - #while True: - # print(get_dg_valves_states()) - # sleep(1) - - Index: tests/hd_nvm_scripts.py =================================================================== diff -u -rcd79d9df6686d5aa1f71ad4789a7c372ddcff370 -r165a814489f7d0e91655b8861d4a4acac3d57f51 --- tests/hd_nvm_scripts.py (.../hd_nvm_scripts.py) (revision cd79d9df6686d5aa1f71ad4789a7c372ddcff370) +++ tests/hd_nvm_scripts.py (.../hd_nvm_scripts.py) (revision 165a814489f7d0e91655b8861d4a4acac3d57f51) @@ -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() @@ -87,9 +87,9 @@ # in your computer. hd.usage_record.cmd_get_hd_usage_info_record() - hd.usage_record.cmd_set_dg_usage_info_excel_to_fw('/home/fw/projects/HD_NV_Records/2022-09-26-HD-Record.xlsx') + #hd.usage_record.cmd_set_dg_usage_info_excel_to_fw('/home/fw/projects/HD_NV_Records/2022-12-07-HD-Record.xlsx') - hd.usage_record.cmd_reset_hd_usage_info_record() + #hd.usage_record.cmd_reset_hd_usage_info_record() def run_service_commands(): @@ -102,9 +102,9 @@ # in your computer. hd.service_record.cmd_get_hd_service_record() - hd.service_record.cmd_set_dg_service_record_excel_to_fw('/home/fw/projects/HD_NV_Records/2022-09-26-HD-Record.xlsx') + #hd.service_record.cmd_set_dg_service_record_excel_to_fw('/home/fw/projects/HD_NV_Records/2022-12-07-HD-Record.xlsx') - hd.service_record.cmd_reset_hd_service_record() + #hd.service_record.cmd_reset_hd_service_record() if __name__ == "__main__": @@ -114,14 +114,14 @@ if hd.cmd_log_in_to_hd(): # Comment this function if not needed - run_sw_configs_commands() + #run_sw_configs_commands() # Comment this function if not needed #run_calibration_commands() #run_system_commands() - #run_usage_info_commands() + run_usage_info_commands() #run_service_commands()