Index: dialin/hd/hemodialysis_device.py =================================================================== diff -u -rcbf5b71c68cea0ec938392e607fb49b04c6946a8 -rabb815a9ad4128e0e4efc491cea8541045773a5a --- dialin/hd/hemodialysis_device.py (.../hemodialysis_device.py) (revision cbf5b71c68cea0ec938392e607fb49b04c6946a8) +++ dialin/hd/hemodialysis_device.py (.../hemodialysis_device.py) (revision abb815a9ad4128e0e4efc491cea8541045773a5a) @@ -177,6 +177,14 @@ """ return self.hd_no_transmit_msg_list + def get_ui_version(self): + """ + Gets the last recieved ui_version from the HD + + @return: ui_version in a string. + """ + return self.ui_version + @publish(["hd_logged_in"]) def hd_set_logged_in_status(self, logged_in: bool = False): """ @@ -226,11 +234,15 @@ message['message'][self.START_POS_BUILD:self.END_POS_BUILD])) compatibility = struct.unpack(' 0 for each in [major, minor, micro, build, compatibility]]): self.ui_version = f"v{major[0]}.{minor[0]}.{micro[0]}-{build[0]}.{compatibility[0]}" self.logger.debug(f"UI VERSION: {self.ui_version}") + else: + self.ui_version = None + self.logger.debug("Failed to retrieve UI Version.") + def cmd_log_in_to_hd(self, resend: bool = False) -> int: """ Constructs and sends a login command via CAN bus. Login required before \n