Index: dialin/dg/sw_configs.py =================================================================== diff -u -re0221f00fe32642b76d4a03c61e3f5ce2da2c881 -reb3c31001963067f30039b526f905505d4396ff2 --- dialin/dg/sw_configs.py (.../sw_configs.py) (revision e0221f00fe32642b76d4a03c61e3f5ce2da2c881) +++ dialin/dg/sw_configs.py (.../sw_configs.py) (revision eb3c31001963067f30039b526f905505d4396ff2) @@ -32,27 +32,28 @@ class DGSWConfigs(DialinEnum): # NOTE: NUM_OF enum has been removed because it should be a part of the software configuration # structure since the members of this class is for looped to create the dictionary automatically - SW_CONFIG_DISABLE_HEATERS_AND_TEMPS = 0 + SW_CONFIG_DISABLE_TRIMMER_HEATER = 0 SW_CONFIG_DISABLE_ACCELS = 1 SW_CONFIG_DISABLE_CAL_CHECK = 2 SW_CONFIG_DISABLE_HEATERS_MONITOR = 3 - SW_CONFIG_DISBALE_DRAIN_PUMP_MONITOR = 4 + SW_CONFIG_DISABLE_DRAIN_PUMP_MONITOR = 4 SW_CONFIG_DISABLE_RO_PUMP_MONITOR = 5 SW_CONFIG_DISABLE_RO_RATIO_CHECK = 6 SW_CONFIG_DISABLE_COND_SENSOR_CHECK = 7 - SW_CONFIG_DISBALE_WATER_QAULITY_CHECK = 8 - SW_CONFIG_DISBALE_FLOW_LOAD_CELL_CHECK_IN_FILL = 9 + SW_CONFIG_DISABLE_WATER_QUALITY_CHECK = 8 + SW_CONFIG_DISABLE_FLOW_VS_LOAD_CELL_CHECK_IN_FILL = 9 SW_CONFIG_DISABLE_HEATERS_EFFICIENCY = 10 - SW_CONFIG_DISBALE_DISINFECT_CONDUCTIVITY_CHECK = 11 - SW_CONFIG_DISABLE_CAPS_MONITOR = 12 - SW_CONFIG_DISBALE_UV_REACTORS = 13 - SW_CONFIG_DISABLE_ACID_ALARMS = 14 - SW_CONFIG_DISABLE_BICARB_ALARMS = 15 - SW_CONFIG_DISABLE_EMPTY_BOTTLES_ALARM = 16 - SW_CONFIG_DISABLE_BICARB_CONDUCTIVITY_TEST = 17 - SW_CONFIG_DISABLE_ACID_CONDUCTIVITY_TEST = 18 - SW_CONFIG_DISABLE_DIALYSATE_CHECK = 19 - SW_CONFIG_DISABLE_MIXING_IN_FILL = 20 + SW_CONFIG_DISABLE_DISINFECT_CONDUCTIVITY_CHECK = 11 + SW_CONFIG_DISABLE_CONC_PUMPS = 12 + SW_CONFIG_DISABLE_CAPS_MONITOR = 13 + SW_CONFIG_DISABLE_UV_REACTORS = 14 + SW_CONFIG_DISABLE_ACID_ALARMS = 15 + SW_CONFIG_DISABLE_BICARB_ALARMS = 16 + SW_CONFIG_DISABLE_EMPTY_BOTTLES_ALARM = 17 + SW_CONFIG_DISABLE_BICARB_CONDUCTIVITY_TEST = 18 + SW_CONFIG_DISABLE_ACID_CONDUCTIVITY_TEST = 19 + SW_CONFIG_DISABLE_CONC_PUMPS_SPEED_ALARM = 20 + SW_CONFIG_DISABLE_MIXING_IN_FILL = 21 class DGSoftwareConfigs(AbstractSubSystem): @@ -103,8 +104,7 @@ """ # Get the default software configuration dictionary self.dg_sw_config_record = self._prepare_dg_sw_configs_record() - # Calculate the CRC for reset software configuration record - self._utilities.reset_fw_system_service_record(self.dg_sw_config_record) + status = self._cmd_set_dg_sw_config_record() return status @@ -316,4 +316,4 @@ while not observer.received: sleep(0.1) # Write the updated values from excel to firmware - self._utilities.write_sw_config_to_excel(self.dg_sw_config_record) + self._utilities.write_sw_config_to_excel(self.dg_sw_config_record, self._FIRMWARE_STACK_NAME) Index: dialin/hd/post_treatment.py =================================================================== diff -u -re0221f00fe32642b76d4a03c61e3f5ce2da2c881 -reb3c31001963067f30039b526f905505d4396ff2 --- dialin/hd/post_treatment.py (.../post_treatment.py) (revision e0221f00fe32642b76d4a03c61e3f5ce2da2c881) +++ dialin/hd/post_treatment.py (.../post_treatment.py) (revision eb3c31001963067f30039b526f905505d4396ff2) @@ -71,10 +71,10 @@ @return: none """ - #payload = message['message'] - #index = MsgFieldPositions.START_POS_FIELD_1.value + payload = message['message'] + index = MsgFieldPositions.START_POS_FIELD_1.value #print(index) - #self.post_treatment_sub_mode, index = bytearray_to_integer(payload, index, False) + self.post_treatment_sub_mode, index = bytearray_to_integer(payload, index, False) #print(index) #self.post_treatment_drain_state, index = bytearray_to_integer(payload, index, False) Index: tests/dg_hd_switches_test.py =================================================================== diff -u -r3a70bfb451b74106348c064c34f19934aadd9119 -reb3c31001963067f30039b526f905505d4396ff2 --- tests/dg_hd_switches_test.py (.../dg_hd_switches_test.py) (revision 3a70bfb451b74106348c064c34f19934aadd9119) +++ tests/dg_hd_switches_test.py (.../dg_hd_switches_test.py) (revision eb3c31001963067f30039b526f905505d4396ff2) @@ -40,12 +40,12 @@ dg = DG(log_level="DEBUG") if dg.cmd_log_in_to_dg(resend=False): - print(dg.switches.get_switches_status()) + #print(dg.switches.get_switches_status()) #dg.switches.cmd_dg_switch_status_override(DGSwitchesName.FLUID_DOOR.value, DGSwitchStatus.ON.value) #dg.switches.cmd_dg_switch_status_override(DGSwitchesName.CONCENTRATE_CAP.value, DGSwitchStatus.OFF.value, reset=1) - dg.switches.cmd_dg_switches_data_broadcast_interval_override(100, reset=1) + #dg.switches.cmd_dg_switches_data_broadcast_interval_override(100, reset=1)switch while True: Index: tests/dg_nvm_scripts.py =================================================================== diff -u -rc4e2aaf6ce54297baf4b034e8c95fc9a3f6dfe25 -reb3c31001963067f30039b526f905505d4396ff2 --- tests/dg_nvm_scripts.py (.../dg_nvm_scripts.py) (revision c4e2aaf6ce54297baf4b034e8c95fc9a3f6dfe25) +++ tests/dg_nvm_scripts.py (.../dg_nvm_scripts.py) (revision eb3c31001963067f30039b526f905505d4396ff2) @@ -15,29 +15,58 @@ ############################################################################ from dialin import DG -if __name__ == "__main__": - dg = DG(log_level="DEBUG") +def run_sw_configs_commands(): + # NOTE: For further details, please refer to 'Instructions to Change the Software Configurations Dynamically' in + # the development section of the DevOps OneNote file - if dg.cmd_log_in_to_dg(): + # Comment and un-comment any of the functions that you would like to use or you can use your own scripts. - # NOTE: For further details, please refer to 'Instructions to Calibrate a Device Using the Calibration Report' - # in the development section of the DevOps OneNote file + # Use cmd_get_dg_sw_config_record() to get the software configurations record in an excel + # This function gets an address to locate the report there (i.e. /home/fw/projects/) + # 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() - # Comment and un-comment any of the functions that you would like to use or you can use your own scripts. + # 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-04-20-DG-SW-CONFIGS-Record.xlsx') - # Use cmd_get_dg_calibration_record_report() to get the calibration record in an excel - # This function gets an address to locate the report there (i.e. /home/fw/projects/) - # 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. - #dg.calibration_record.cmd_get_dg_calibration_record_report() + # Use this function to reset the configuration records to all be 0 + #dg.sw_configs.cmd_reset_dg_sw_config_record() - # 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-03-31-DG-Record.xlsx') - # For resetting the calibration record to benign values, use the function below - dg.calibration_record.cmd_reset_dg_calibration_record() +def run_calibration_commands(): + # NOTE: For further details, please refer to 'Instructions to Calibrate a Device Using the Calibration Report' + # in the development section of the DevOps OneNote file + # Comment and un-comment any of the functions that you would like to use or you can use your own scripts. + + # Use cmd_get_dg_calibration_record_report() to get the calibration record in an excel + # This function gets an address to locate the report there (i.e. /home/fw/projects/) + # 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. + # dg.calibration_record.cmd_get_dg_calibration_record_report() + + # 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-03-31-DG-Record.xlsx') + + # For resetting the calibration record to benign values, use the function below + dg.calibration_record.cmd_reset_dg_calibration_record() + + +if __name__ == "__main__": + + dg = DG(log_level="DEBUG") + + if dg.cmd_log_in_to_dg(): + + run_sw_configs_commands() + + #run_calibration_commands() +