Index: leahi_dialin/td/treatment_delivery.py =================================================================== diff -u -r9c2fab5b413da62b218e6a9a12a5752e974071a0 -re7c76d620568e574df68be3bd0efb52a9b5d2845 --- leahi_dialin/td/treatment_delivery.py (.../treatment_delivery.py) (revision 9c2fab5b413da62b218e6a9a12a5752e974071a0) +++ leahi_dialin/td/treatment_delivery.py (.../treatment_delivery.py) (revision e7c76d620568e574df68be3bd0efb52a9b5d2845) @@ -221,11 +221,11 @@ result = self.process_into_vars(decoder_list = msg_list, message = message) - if all([len(each) > 0 for each in [result['major'], result['minor'], result['micro'], result['build'], result['compatibility']]]): + if all([each is not None for each in [result['major'], result['minor'], result['micro'], result['build'], result['compatibility']]]): self.td_version = f"v{result['major']}.{result['minor']}.{result['micro']}-{result['build']}.{result['compatibility']}" self.logger.debug(f'TD VERSION: {self.td_version}') - if all([len(each) > 0 for each in [result['fpga_id'], result['fpga_major'], result['fpga_minor'], result['fpga_lab']]]): + if all([each is not None for each in [result['fpga_id'], result['fpga_major'], result['fpga_minor'], result['fpga_lab']]]): self.td_fpga_version = f"v{result['fpga_id']}.{result['fpga_major']}.{result['fpga_minor']}-{result['fpga_lab']}" self.logger.debug(f'TD FPGA VERSION: {self.td_fpga_version}') @@ -256,7 +256,7 @@ result = self.process_into_vars(decoder_list = msg_list, message = message) - if all([len(each) > 0 for each in [result['major'], result['minor'], result['micro'], result['build'], result['compatibility']]]): + if all([each is not None for each in [result['major'], result['minor'], result['micro'], result['build'], result['compatibility']]]): self.ui_version = f"v{result['major']}.{result['minor']}.{result['micro']}-{result['build']}.{result['compatibility']}" self.logger.debug(f'UI VERSION: {self.ui_version}') else: @@ -294,8 +294,8 @@ @return: 1 if logged in, 0 if log in failed """ message = CanMessage.build_message(channel_id=CanChannels.dialin_to_td_ch_id, - message_id=MsgIds.MSG_ID_TD_TESTER_LOGIN_REQUEST.value, - payload=list(map(int, map(ord, self.TD_LOGIN_PASSWORD)))) + message_id=MsgIds.MSG_ID_TD_TESTER_LOGIN_REQUEST.value, + payload=list(map(int, map(ord, self.TD_LOGIN_PASSWORD)))) self.logger.debug("Logging in...") @@ -403,13 +403,17 @@ @return: none """ - message = CanMessage.build_message(channel_id=CanChannels.dialin_to_td_ch_id, - message_id=MsgIds.MSG_ID_TD_UI_VERSION_INFO_REQUEST.value) + return cmd_generic_override( + payload = None, + reset = None, + channel_id = CanChannels.td_to_ui_ch_id, + msg_id = MsgIds.MSG_ID_TD_UI_VERSION_INFO_REQUEST, + entity_name = 'UI Versions Request', + override_text = '', + logger = self.logger, + can_interface = self.can_interface) - self.logger.debug("Sending an UI version request to the TD.") - self.can_interface.send(message, 0) - def cmd_training_test_override(self, value: int, reset: int = NO_RESET) -> int: """ Constructs and sends a training test override request to the TD.