Index: dialin/common/hd_defs.py =================================================================== diff -u -r9dee83286969ac19c09f6879394494e551663cb5 -r27872ba051da5230041de569fc817d3c00a5ddb0 --- dialin/common/hd_defs.py (.../hd_defs.py) (revision 9dee83286969ac19c09f6879394494e551663cb5) +++ dialin/common/hd_defs.py (.../hd_defs.py) (revision 27872ba051da5230041de569fc817d3c00a5ddb0) @@ -8,7 +8,7 @@ # @file hd_defs.py # # @author (last) Sean Nash -# @date (last) 16-Mar-2023 +# @date (last) 31-Mar-2023 # @author (original) Peter Lucia # @date (original) 04-Dec-2020 # @@ -387,8 +387,18 @@ TREATMENT_PARAM_HEPARIN_BOLUS_VOLUME_ML = 16 TREATMENT_PARAM_DIALYSATE_TEMPERATURE_C = 17 TREATMENT_PARAM_UF_VOLUME_L = 18 - NUM_OF_TREATMENT_PARAMS = 19 + NUM_OF_TREATMENT_PARAMS = 19 +class Acid_Concentrates(DialinEnum): + ACID_CONC_TYPE_FRESENIUS_08_1251_1 = 0 + ACID_CONC_TYPE_FRESENIUS_08_2251_0 = 1 + ACID_CONC_TYPE_FRESENIUS_08_3251_9 = 2 + NUM_OF_ACID_CONC_TYPES = 3 + +class Bicarb_Concentrates(DialinEnum): + BICARB_CONC_TYPE_FRESENIUS_CENTRISOL = 0 + NUM_OF_BICARB_CONC_TYPES = 1 + @unique class PowerOffCommands(DialinEnum): """ Index: dialin/hd/treatment.py =================================================================== diff -u -rc45a42475147641810dd252aefcd2c7872f13c7f -r27872ba051da5230041de569fc817d3c00a5ddb0 --- dialin/hd/treatment.py (.../treatment.py) (revision c45a42475147641810dd252aefcd2c7872f13c7f) +++ dialin/hd/treatment.py (.../treatment.py) (revision 27872ba051da5230041de569fc817d3c00a5ddb0) @@ -7,8 +7,8 @@ # # @file treatment.py # -# @author (last) Micahel Garthwaite -# @date (last) 03-Mar-2023 +# @author (last) Sean Nash +# @date (last) 28-Mar-2023 # @author (original) Peter Lucia # @date (original) 02-Apr-2020 # Index: dialin/hd/ui_proxy.py =================================================================== diff -u -r9dee83286969ac19c09f6879394494e551663cb5 -r27872ba051da5230041de569fc817d3c00a5ddb0 --- dialin/hd/ui_proxy.py (.../ui_proxy.py) (revision 9dee83286969ac19c09f6879394494e551663cb5) +++ dialin/hd/ui_proxy.py (.../ui_proxy.py) (revision 27872ba051da5230041de569fc817d3c00a5ddb0) @@ -7,8 +7,8 @@ # # @file ui_proxy.py # -# @author (last) Micahel Garthwaite -# @date (last) 07-Mar-2023 +# @author (last) Dara Navaei +# @date (last) 28-Mar-2023 # @author (original) Sean # @date (original) 15-Apr-2020 # @@ -1722,7 +1722,35 @@ self.logger.debug("Setting DG service time.") self.can_interface.send(message, 0) - @publish(["hd_disinfection_standby_timestamp","disinfects_hd_submode", "disinfects_dg_mode"]) + def cmd_set_ro_only_mode_status(self, status: int) -> int: + """ + Constructs and sends a message to DG to set the status of the RO only mode: + 1 = Enable RO only mode + 0 = Disable RO only mode and be normal mode + + @param status: (int) RO only mode status (1=enable, 0=disable) + @return: 1 if successful, zero otherwise + """ + st = integer_to_bytearray(status) + payload = st + + message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_dg_ch_id, + message_id=MsgIds.MSG_ID_UI_SET_DG_RO_MODE.value, + payload=payload) + + self.logger.debug("Setting RO only mode to: {}".format(status)) + + received_message = self.can_interface.send(message) + + # If there is content... + if received_message is not None: + # response payload is OK or not OK + return received_message['message'][DenaliMessage.PAYLOAD_START_INDEX] + else: + self.logger.debug("Timeout!!!!") + return False + + @publish(["hd_disinfection_standby_timestamp", "disinfects_hd_submode", "disinfects_dg_mode"]) def _handler_disinfects_data_publish(self, message: dict, timestamp=0.0) -> None: """ Handles published disinfect mode and submode that is published to UI Index: tests/dg_tests.py =================================================================== diff -u -rc45a42475147641810dd252aefcd2c7872f13c7f -r27872ba051da5230041de569fc817d3c00a5ddb0 --- tests/dg_tests.py (.../dg_tests.py) (revision c45a42475147641810dd252aefcd2c7872f13c7f) +++ tests/dg_tests.py (.../dg_tests.py) (revision 27872ba051da5230041de569fc817d3c00a5ddb0) @@ -8,7 +8,7 @@ # @file dg_tests.py # # @author (last) Dara Navaei -# @date (last) 16-Mar-2023 +# @date (last) 27-Mar-2023 # @author (original) Dara Navaei # @date (original) 16-Jan-2022 # @@ -662,7 +662,7 @@ hd.cmd_log_in_to_hd() sleep(1) - run_heat_disinfect() + #run_heat_disinfect() #run_flush_mode() @@ -696,4 +696,10 @@ #hd.cmd_hd_software_reset_request() + hd.ui.cmd_set_ro_only_mode_status(1) + while True: + print(dg.dialysate_fill.ro_only_mode_status) + sleep(1) + + Index: tests/hd_nvm_scripts.py =================================================================== diff -u -rc45a42475147641810dd252aefcd2c7872f13c7f -r27872ba051da5230041de569fc817d3c00a5ddb0 --- tests/hd_nvm_scripts.py (.../hd_nvm_scripts.py) (revision c45a42475147641810dd252aefcd2c7872f13c7f) +++ tests/hd_nvm_scripts.py (.../hd_nvm_scripts.py) (revision 27872ba051da5230041de569fc817d3c00a5ddb0) @@ -8,7 +8,7 @@ # @file hd_nvm_scripts.py # # @author (last) Dara Navaei -# @date (last) 16-Mar-2023 +# @date (last) 27-Mar-2023 # @author (original) Dara Navaei # @date (original) 10-Feb-2022 # @@ -55,7 +55,7 @@ # 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/2023-03-27-HD-Record.xlsx') # For resetting the calibration record to benign values, use the function below hd.calibration_record.cmd_reset_hd_calibration_record() @@ -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() Index: tools/Code_Report.csv =================================================================== diff -u -r9d480e64665b22ec80e9da5fd9946f1216d1a0a2 -r27872ba051da5230041de569fc817d3c00a5ddb0 --- tools/Code_Report.csv (.../Code_Report.csv) (revision 9d480e64665b22ec80e9da5fd9946f1216d1a0a2) +++ tools/Code_Report.csv (.../Code_Report.csv) (revision 27872ba051da5230041de569fc817d3c00a5ddb0) @@ -206,11 +206,11 @@ ./dg/thermistors.py, Function, cmd_thermistors_data_broadcast_interval_override(self, ms: int, reset: int = NO_RESET) -> int: ./dg/thermistors.py, Function, get_temperature(self, thermistor): ./dg/thermistors.py, Function, cmd_thermistors_value_override(self, thermistor: int, value: float, reset: int = NO_RESET) -> int: -./dg/usage_info_record.py, Function, cmd_dg_usage_info_crc_override(self, crc: int) -> bool: ./dg/usage_info_record.py, Function, cmd_update_dg_usage_info_record(self, excel_report_path: str): ./dg/usage_info_record.py, Function, cmd_get_dg_usage_info_record(self, report_address: str = None): ./dg/usage_info_record.py, Function, cmd_reset_dg_usage_info_record(self) -> bool: ./dg/usage_info_record.py, Function, cmd_set_dg_usage_info_excel_to_fw(self, report_address: str): +./dg/usage_info_record.py, Function, cmd_dg_usage_info_crc_override(self, crc: int) -> bool: ./dg/uv_reactors.py, Function, get_outlet_uv_reactor_state(self) -> int: ./dg/uv_reactors.py, Function, cmd_uv_reactors_data_broadcast_interval_override(self, ms: int, reset: int = NO_RESET) -> int: ./dg/uv_reactors.py, Function, cmd_uv_reactors_health_override(self, reactor: int, health: int, reset: int = NO_RESET) -> int: @@ -575,6 +575,7 @@ ./hd/ui_proxy.py, Function, cmd_ui_set_standby_submode_to_disinfect(self) -> None: ./hd/ui_proxy.py, Function, cmd_ui_set_hd_service_time(self) -> None: ./hd/ui_proxy.py, Function, cmd_ui_set_dg_service_time(self) -> None: +./hd/ui_proxy.py, Function, cmd_set_ro_only_mode_status(self, status: int) -> int: ./hd/ui_proxy.py, Function, get_hd_version(self): ./hd/ui_proxy.py, Function, get_fpga_version(self): ./hd/ui_proxy.py, Function, get_reject_reasons(self): @@ -720,6 +721,7 @@ dg/dialysate_fill.py, Variable, used_bicarb dg/dialysate_fill.py, Variable, total_volume dg/dialysate_fill.py, Variable, dg_fill_mode_timestamp +dg/dialysate_fill.py, Variable, ro_only_mode_status dg/dialysate_generator.py, Variable, dg_version dg/dialysate_generator.py, Variable, fpga_version dg/dialysate_generator.py, Variable, dg_operation_mode @@ -1253,6 +1255,7 @@ hd/ui_proxy.py, Variable, reject_reasons[RequestRejectReasons(attr).name] hd/ui_proxy.py, Variable, reject_reasons hd/usage_info_record.py, Variable, hd_usage_info_record +hd/usage_info_record.py, Variable, hd_usage_info_record_timestamp hd/valves.py, Variable, hd_valves_timestamp hd/valves.py, Variable, valves_status hd/valves.py, Variable, hd_air_trap_status @@ -2345,15 +2348,15 @@ common/msg_ids.py, Enum, MsgIds, MSG_ID_HD_REQUEST_DG_SERVICE_RECORD common/msg_ids.py, Enum, MsgIds, MSG_ID_HD_REQUEST_UI_CONFIRMATION common/msg_ids.py, Enum, MsgIds, MSG_ID_UI_CONFIRMATION_RESULT -common/msg_ids.py, Enum, MsgIds, MSG_ID_REQUEST_CPLD_STATUS +common/msg_ids.py, Enum, MsgIds, MSG_ID_UI_SET_DG_RO_MODE common/msg_ids.py, Enum, MsgIds, MSG_ID_DG_CPLD_STATUS common/msg_ids.py, Enum, MsgIds, MSG_ID_HD_BATTERY_MANAGEMENT_DATA common/msg_ids.py, Enum, MsgIds, MSG_ID_HD_BATTERY_STATUS_DATA common/msg_ids.py, Enum, MsgIds, MSG_ID_DG_CHEM_DISINFECT_FLUSH_DATA common/msg_ids.py, Enum, MsgIds, MSG_ID_DG_CHEM_DISINFECT_FLUSH_TIME_DATA common/msg_ids.py, Enum, MsgIds, MSG_ID_DG_START_STOP_CHEM_DISINFECT_FLUSH -common/msg_ids.py, Enum, MsgIds, MSG_ID_UI_CHEM_DISINFECT_FLUSH_CONFIRM -common/msg_ids.py, Enum, MsgIds, MSG_ID_HD_CHEM_DISINFECT_FLUSH_CONFIRM_RESPONSE +common/msg_ids.py, Enum, MsgIds, MSG_ID_DG_RO_ONLY_MODE_STATUS_REQUEST +common/msg_ids.py, Enum, MsgIds, MSG_ID_DG_RO_ONLY_MODE_STATUS_RESPONSE common/msg_ids.py, Enum, MsgIds, MSG_ID_DG_HEAT_DISINFECT_ACTIVE_COOL_DATA common/msg_ids.py, Enum, MsgIds, MSG_ID_DG_START_STOP_HEAT_DISINFECT_ACTIVE_COOL common/msg_ids.py, Enum, MsgIds, MSG_ID_HD_AIR_PUMP_DATA