Index: leahi_dialin/td/modules/bubble_detector.py =================================================================== diff -u -rd1377c677d8a9fc576f941f413ae3b6af6f50776 -rbcee4d024cee5855b3662785cad1c6834c5dc858 --- leahi_dialin/td/modules/bubble_detector.py (.../bubble_detector.py) (revision d1377c677d8a9fc576f941f413ae3b6af6f50776) +++ leahi_dialin/td/modules/bubble_detector.py (.../bubble_detector.py) (revision bcee4d024cee5855b3662785cad1c6834c5dc858) @@ -68,23 +68,20 @@ @publish(["td_air_bubbles_timestamp", "h18_air_bubbles_status", "h18_air_bubbles_state"]) def _handler_air_bubbles_data_sync(self, message, timestamp=0.0): """ - Handles published air bubbles data messages. Air bubble status and state are captured - for ADV detector. + Handles published air bubbles data messages. Air bubble status and state are captured. - @param message: published air bubbles data message as: ADV status, ADV state + @param message: published air bubbles data message as: h18 bubble status, h18 bubble state @return: None """ - adv_status = struct.unpack('i', bytearray( - message['message'][MsgFieldPositions.START_POS_FIELD_1:MsgFieldPositions.END_POS_FIELD_1])) - adv_state = struct.unpack('i', bytearray( - message['message'][MsgFieldPositions.START_POS_FIELD_2:MsgFieldPositions.END_POS_FIELD_2])) + self.h18_air_bubbles_status = struct.unpack('i', bytearray( + message['message'][MsgFieldPositions.START_POS_FIELD_1:MsgFieldPositions.END_POS_FIELD_1]))[0] + self.h18_air_bubbles_state = struct.unpack('i', bytearray( + message['message'][MsgFieldPositions.START_POS_FIELD_2:MsgFieldPositions.END_POS_FIELD_2]))[0] - self.h18_air_bubbles_status = [adv_status[0]] - self.h18_air_bubbles_state = [adv_state[0]] self.td_air_bubbles_timestamp = timestamp - def cmd_air_bubble_status_override(self, status: int, index: int, reset: int = NO_RESET) -> int: + def cmd_air_bubble_status_override(self, index: int, status: int, reset: int = NO_RESET) -> int: """ Constructs and sends the air bubble detector status override command Constraints: @@ -106,9 +103,6 @@ message_id=MsgIds.MSG_ID_TD_BUBBLE_OVERRIDE_REQUEST.value, payload=payload) - if index == self.ADV: - self.logger.debug("Override air bubble detector ADV status value") - # Send message received_message = self.can_interface.send(message)