Index: dialin/common/msg_defs.py =================================================================== diff -u -r881c190c1e90f09fa5584231a3e93a09bfb955c8 -r6d4a52bb6a72a7a213adf6da7e39cb64c6b7c2d1 --- dialin/common/msg_defs.py (.../msg_defs.py) (revision 881c190c1e90f09fa5584231a3e93a09bfb955c8) +++ dialin/common/msg_defs.py (.../msg_defs.py) (revision 6d4a52bb6a72a7a213adf6da7e39cb64c6b7c2d1) @@ -87,7 +87,6 @@ MsgIds.MSG_ID_DG_FLUSH_DATA.value, MsgIds.MSG_ID_HD_VOLTAGES_DATA.value, MsgIds.MSG_ID_HD_ALARM_INFORMATION.value, - MsgIds.MSG_ID_HD_DISINFECT_STANDBY_DATA.value, MsgIds.MSG_ID_DG_HEAT_DISINFECT_TIME_DATA.value, MsgIds.MSG_ID_DG_CHEM_DISINFECT_TIME_DATA.value, MsgIds.MSG_ID_DG_VOLTAGES_DATA.value, Index: dialin/common/msg_ids.py =================================================================== diff -u -r535bf5f030deddfd0d99edce1d8d011b7797e1e2 -r6d4a52bb6a72a7a213adf6da7e39cb64c6b7c2d1 --- dialin/common/msg_ids.py (.../msg_ids.py) (revision 535bf5f030deddfd0d99edce1d8d011b7797e1e2) +++ dialin/common/msg_ids.py (.../msg_ids.py) (revision 6d4a52bb6a72a7a213adf6da7e39cb64c6b7c2d1) @@ -26,7 +26,7 @@ MSG_ID_ALARM_TRIGGERED = 0x3 MSG_ID_ALARM_CLEARED = 0x4 MSG_ID_BLOOD_FLOW_DATA = 0x5 - MSG_ID_DG_CHECK_IN = 0x6 + MSG_ID_UI_POST_TX_NEXT_REQUEST = 0x6 MSG_ID_UI_CHECK_IN = 0x7 MSG_ID_DIALYSATE_FLOW_DATA = 0x8 MSG_ID_PRESSURE_OCCLUSION_DATA = 0x9 @@ -146,7 +146,7 @@ MSG_ID_HD_VOLTAGES_DATA = 0x7B MSG_ID_HD_ALARM_AUDIO_VOLUME_SET_RESPONSE = 0x7C MSG_ID_HD_ALARM_INFORMATION = 0x7D - MSG_ID_HD_DISINFECT_STANDBY_DATA = 0x7E + MSG_ID_HD_POST_TX_NEXT_CMD_RESPONSE = 0x7E MSG_ID_UI_DISINFECT_REQUEST = 0x7F MSG_ID_HD_DISINFECT_RESPONSE = 0x80 MSG_ID_UI_CHEM_DISINFECT_CONFIRM = 0x81 Index: dialin/hd/ui_proxy.py =================================================================== diff -u -raf4107dc7b664e190b9d4a4308cf6fef72e0eeea -r6d4a52bb6a72a7a213adf6da7e39cb64c6b7c2d1 --- dialin/hd/ui_proxy.py (.../ui_proxy.py) (revision af4107dc7b664e190b9d4a4308cf6fef72e0eeea) +++ dialin/hd/ui_proxy.py (.../ui_proxy.py) (revision 6d4a52bb6a72a7a213adf6da7e39cb64c6b7c2d1) @@ -153,11 +153,6 @@ register_receiving_publication_function(DenaliChannels.hd_to_ui_ch_id, MsgIds.MSG_ID_HD_SET_STANDBY_DISINFECT_SUB_MODE_RESPONSE.value, self._handler_treatment_end_cmd_response) - self.can_interface.\ - register_receiving_publication_function(DenaliChannels.hd_sync_broadcast_ch_id, - MsgIds.MSG_ID_HD_DISINFECT_STANDBY_DATA.value, - self._handler_disinfects_data_publish) - self.can_interface.register_receiving_publication_function(DenaliChannels.hd_to_ui_ch_id, MsgIds.MSG_ID_HD_ACTIVE_ALARMS_LIST_REQUEST_RESPONSE.value, self._handler_active_alarm_list_response) @@ -1090,24 +1085,6 @@ self.alarm_list_response = (al1, al2, al3, al4, al5, al6, al7, al8, al9, al10) self.hd_active_alarm_list_timestamp = timestamp - @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 - - @param message: published RO pump data message - - @return: None - """ - dg_submode = struct.unpack('i', bytearray( - message['message'][MsgFieldPositions.START_POS_FIELD_1:MsgFieldPositions.END_POS_FIELD_1]))[0] - hd_state = struct.unpack('i', bytearray( - message['message'][MsgFieldPositions.START_POS_FIELD_2:MsgFieldPositions.END_POS_FIELD_2]))[0] - - self.disinfects_hd_submode = hd_state - self.disinfects_dg_mode = dg_submode - self.hd_disinfection_standby_timestamp = timestamp - @publish(["ro_mode_timestamp", "ro_mode_status", "ro_mode_rejection_status"]) def _handler_ro_mode_status(self, message: dict, timestamp=0.0) -> None: """ @@ -1838,7 +1815,7 @@ self.logger.debug("Sending active alarm list request msg to HD.") self.can_interface.send(message, 0) - def cmd_ui_off_button_response(self, reponse: int) -> int: + def cmd_ui_off_button_response(self, response: int) -> int: """ Constructs and sends a message to HD to proxy the response from the off button message request 0 = OFF_BUTTON_RSP_USER_REQUESTS_POWER_OFF # User requests power off response @@ -1848,7 +1825,7 @@ @param response: (int) off button response to HD @return: 1 if successful, zero otherwise """ - res = integer_to_bytearray(reponse) + res = integer_to_bytearray(response) payload = res message = DenaliMessage.build_message(channel_id=DenaliChannels.ui_to_hd_ch_id, @@ -1873,8 +1850,7 @@ 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 + @return: 1 if RO only mode is enabled, zero if not """ message = DenaliMessage.build_message(channel_id=DenaliChannels.dialin_to_dg_ch_id, Index: dialin/ui/hd_simulator.py =================================================================== diff -u -r535bf5f030deddfd0d99edce1d8d011b7797e1e2 -r6d4a52bb6a72a7a213adf6da7e39cb64c6b7c2d1 --- dialin/ui/hd_simulator.py (.../hd_simulator.py) (revision 535bf5f030deddfd0d99edce1d8d011b7797e1e2) +++ dialin/ui/hd_simulator.py (.../hd_simulator.py) (revision 6d4a52bb6a72a7a213adf6da7e39cb64c6b7c2d1) @@ -1909,26 +1909,6 @@ self.can_interface.send(message, 0) - def cmd_send_hd_disinfection_state(self, sub_mode: int, flush_mode: int, heat_mode: int, - chemical_mode: int) -> None: - """ - Broadcasts the current DG disinfection mode - @param sub_mode: (int) disinfect states - @param flush_mode: (int) flush states - @param heat_mode: (int) heat states - @param chemical_mode: (int) chemical states - @return: None - """ - payload = integer_to_bytearray(sub_mode) - payload += integer_to_bytearray(flush_mode) - payload += integer_to_bytearray(heat_mode) - payload += integer_to_bytearray(chemical_mode) - - message = DenaliMessage.build_message(channel_id=DenaliChannels.hd_sync_broadcast_ch_id, - message_id=MsgIds.MSG_ID_HD_DISINFECT_STANDBY_DATA.value, - payload=payload) - self.can_interface.send(message, 0) - def cmd_send_hd_disinfect_response(self, accepted: bool, reason: int) -> None: """ the HD response to the request from UI to initiate a disinfection/flush