Index: dialin/common/test_config_defs.py =================================================================== diff -u -r9c740ce9dd2c7353eadc4d494f51a24157486ea7 -rcd99ca8354f5c7910f699b7ac2c1976781b07627 --- dialin/common/test_config_defs.py (.../test_config_defs.py) (revision 9c740ce9dd2c7353eadc4d494f51a24157486ea7) +++ dialin/common/test_config_defs.py (.../test_config_defs.py) (revision cd99ca8354f5c7910f699b7ac2c1976781b07627) @@ -20,15 +20,12 @@ @unique class DGTestConfigOptions(DialinEnum): - # NOTE: This enum has been commented out because two enums cannot have the same value but the firmware is assigned - # to the enum number. TEST_CONFIG_ENABLE_MIXING_WITH_WATER = 0 # Test configuration enable mixing with water. - # TEST_CONFIG_FIRST = TEST_CONFIG_ENABLE_MIXING_WITH_WATER, # Test configuration first configuration. NUM_OF_TEST_CONFIGS = 1 # Number of test configurations. @unique class HDTestConfigOptions(DialinEnum): - TEST_CONFIG_ENABLE_WET_CARTRIDGE_USE = 0 # Test configuration enable mixing with water. - # TEST_CONFIG_FIRST = TEST_CONFIG_ENABLE_MIXING_WITH_WATER, # Test configuration first configuration. - NUM_OF_TEST_CONFIGS = 1 + TEST_CONFIG_USE_WET_CARTRIDGE = 0 # Test configuration use wet cartridge. + TEST_CONFIG_USE_WORN_CARTRIDGE = 1 # Test configuration use worn cartridge. + NUM_OF_TEST_CONFIGS = 2 # Number of test configurations Index: dialin/hd/hd_test_configs.py =================================================================== diff -u -r9c740ce9dd2c7353eadc4d494f51a24157486ea7 -rcd99ca8354f5c7910f699b7ac2c1976781b07627 --- dialin/hd/hd_test_configs.py (.../hd_test_configs.py) (revision 9c740ce9dd2c7353eadc4d494f51a24157486ea7) +++ dialin/hd/hd_test_configs.py (.../hd_test_configs.py) (revision cd99ca8354f5c7910f699b7ac2c1976781b07627) @@ -30,7 +30,7 @@ self._reset_test_configs_record() if self.can_interface is not None: - channel_id = DenaliChannels.dialin_to_hd_ch_id + channel_id = DenaliChannels.hd_to_dialin_ch_id msg_id = MsgIds.MSG_ID_HD_SEND_TEST_CONFIGURATION.value self.can_interface.register_receiving_publication_function(channel_id, msg_id, self._handler_test_config_sync) Index: dialin/hd/hemodialysis_device.py =================================================================== diff -u -r9bc00e997e91dab8b404aa877b02ae3d4100d417 -rcd99ca8354f5c7910f699b7ac2c1976781b07627 --- dialin/hd/hemodialysis_device.py (.../hemodialysis_device.py) (revision 9bc00e997e91dab8b404aa877b02ae3d4100d417) +++ dialin/hd/hemodialysis_device.py (.../hemodialysis_device.py) (revision cd99ca8354f5c7910f699b7ac2c1976781b07627) @@ -49,6 +49,7 @@ from .sw_configs import HDSoftwareConfigs from .post_treatment import HDPostTreatment from .usage_info_record import HDUsageNVRecord +from .hd_test_configs import HDTestConfig from ..common.msg_defs import MsgIds, MsgFieldPositions from ..protocols.CAN import DenaliMessage, DenaliCanMessenger, DenaliChannels from ..utils.base import AbstractSubSystem, publish, LogManager @@ -170,6 +171,7 @@ self.sw_configs = HDSoftwareConfigs(self.can_interface, self.logger) self.post_treatment = HDPostTreatment(self.can_interface, self.logger) self.usage_record = HDUsageNVRecord(self.can_interface, self.logger) + self.test_configs = HDTestConfig(self.can_interface, self.logger) def get_operation_mode(self): """ Index: tests/dg_nvm_scripts.py =================================================================== diff -u -r4a0c6600b52ec965a6625a428de986e7040ae2c9 -rcd99ca8354f5c7910f699b7ac2c1976781b07627 --- tests/dg_nvm_scripts.py (.../dg_nvm_scripts.py) (revision 4a0c6600b52ec965a6625a428de986e7040ae2c9) +++ tests/dg_nvm_scripts.py (.../dg_nvm_scripts.py) (revision cd99ca8354f5c7910f699b7ac2c1976781b07627) @@ -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/2023-04-25-DG-SW-CONFIGS-Record.xlsx') + dg.sw_configs.cmd_update_dg_sw_config_record('/home/fw/projects/DG_NV_Records/2023-05-05-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() Index: tests/dg_tests.py =================================================================== diff -u -r4a0c6600b52ec965a6625a428de986e7040ae2c9 -rcd99ca8354f5c7910f699b7ac2c1976781b07627 --- tests/dg_tests.py (.../dg_tests.py) (revision 4a0c6600b52ec965a6625a428de986e7040ae2c9) +++ tests/dg_tests.py (.../dg_tests.py) (revision cd99ca8354f5c7910f699b7ac2c1976781b07627) @@ -672,18 +672,19 @@ hd = HD(log_level='DEBUG') hd.cmd_log_in_to_hd() sleep(1) - """ - print(dg.test_configs.dg_test_configs) - print(hex(dg.test_configs.cmd_get_test_config_status(DGTestConfigOptions.TEST_CONFIG_ENABLE_MIXING_WITH_WATER.value))) - dg.test_configs.cmd_set_test_config(DGTestConfigOptions.TEST_CONFIG_ENABLE_MIXING_WITH_WATER.value, reset=0) + print((hd.test_configs.hd_test_configs)) + #print(hex(dg.test_configs.cmd_get_test_config_status(DGTestConfigOptions.TEST_CONFIG_ENABLE_MIXING_WITH_WATER.value))) + + #dg.test_configs.cmd_set_test_config(DGTestConfigOptions.TEST_CONFIG_ENABLE_MIXING_WITH_WATER.value, reset=0) + #hd.test_configs.cmd_set_test_config(HDTestConfigOptions.TEST_CONFIG_USE_WORN_CARTRIDGE.value, reset=1) + hd.test_configs.cmd_reset_all_test_configs() sleep(1) - """ - dg.test_configs.cmd_request_test_config_status_from_fw() + hd.test_configs.cmd_request_test_config_status_from_fw() + while True: - print(hex(dg.test_configs.cmd_get_test_config_status( - DGTestConfigOptions.TEST_CONFIG_ENABLE_MIXING_WITH_WATER.value))) + print(hex(hd.test_configs.hd_test_configs[HDTestConfigOptions.TEST_CONFIG_USE_WORN_CARTRIDGE.name])) sleep(1) #run_heat_disinfect() @@ -698,7 +699,7 @@ # cmd_set_disinfect_ui_screen() - collect_treatment_data() + #collect_treatment_data() #collect_hd_treatment() Index: tests/hd_nvm_scripts.py =================================================================== diff -u -r821d2c94ccc6542a7733a9453e59b751bfd0ef75 -rcd99ca8354f5c7910f699b7ac2c1976781b07627 --- tests/hd_nvm_scripts.py (.../hd_nvm_scripts.py) (revision 821d2c94ccc6542a7733a9453e59b751bfd0ef75) +++ tests/hd_nvm_scripts.py (.../hd_nvm_scripts.py) (revision cd99ca8354f5c7910f699b7ac2c1976781b07627) @@ -114,10 +114,10 @@ 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_calibration_commands() #run_system_commands()