From 6f954ee23499245774e5a641463eada337371861 Mon Sep 17 00:00:00 2001 From: Jonathan Diamond Date: Tue, 19 Sep 2023 08:59:33 -0700 Subject: [PATCH] PR comments. --- python/fusion_engine_client/messages/configuration.py | 5 ++++- src/point_one/fusion_engine/messages/configuration.h | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/python/fusion_engine_client/messages/configuration.py b/python/fusion_engine_client/messages/configuration.py index f72cda6b..fe287096 100644 --- a/python/fusion_engine_client/messages/configuration.py +++ b/python/fusion_engine_client/messages/configuration.py @@ -1177,7 +1177,10 @@ def __init__(self, action: SaveAction = SaveAction.SAVE): self.interfaces : List[InterfaceID] = [] def pack(self, buffer: bytes = None, offset: int = 0, return_buffer: bool = True) -> (bytes, int): - packed_data = self.SupportedIOInterfacesMessageConstruct.build(self.__dict__) + packed_data = self.SupportedIOInterfacesMessageConstruct.build({ + 'num_interfaces': len(self.interfaces), + 'interfaces': self.interfaces + }) return PackedDataToBuffer(packed_data, buffer, offset, return_buffer) def unpack(self, buffer: bytes, offset: int = 0, message_version: int = MessagePayload._UNSPECIFIED_VERSION) -> int: diff --git a/src/point_one/fusion_engine/messages/configuration.h b/src/point_one/fusion_engine/messages/configuration.h index e05d6792..d10a3454 100644 --- a/src/point_one/fusion_engine/messages/configuration.h +++ b/src/point_one/fusion_engine/messages/configuration.h @@ -2042,7 +2042,7 @@ struct P1_ALIGNAS(4) SupportedIOInterfacesMessage : public MessagePayload { uint8_t reserved1[7] = {0}; - /* This in then followed by an array of `num_interfaces` @ref InterfaceID */ + /** This in then followed by an array of `num_interfaces` @ref InterfaceID. */ // InterfaceID interfaces[num_interfaces] }; @@ -2105,7 +2105,9 @@ struct P1_ALIGNAS(4) MessageRateResponse : public MessagePayload { /** The output interface corresponding with this response. */ InterfaceID output_interface = {}; - /* This in then followed by an array of num_rates MessageRateResponseEntry */ + /** + * This in then followed by an array of num_rates MessageRateResponseEntry. + */ // MessageRateResponseEntry rates[num_rates] };