From 1b2a09c5294b1a413705145df2ab824fa87832d7 Mon Sep 17 00:00:00 2001 From: ahiuchingau <20424172+ahiuchingau@users.noreply.github.com> Date: Mon, 11 Dec 2023 12:19:55 -0500 Subject: [PATCH] format can --- include/can/core/messages.hpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/include/can/core/messages.hpp b/include/can/core/messages.hpp index 10969fa8f..a08458c3a 100644 --- a/include/can/core/messages.hpp +++ b/include/can/core/messages.hpp @@ -1522,43 +1522,41 @@ struct GripperJawStateResponse }; struct SetGripperJawHoldoffRequest - : BaseMessage { + : BaseMessage { uint32_t message_index; uint32_t holdoff_ticks; template - static auto parse(Input body, Limit limit) - -> SetGripperJawHoldoffRequest { + static auto parse(Input body, Limit limit) -> SetGripperJawHoldoffRequest { uint32_t holdoff_ticks = 0; uint32_t msg_ind = 0; body = bit_utils::bytes_to_int(body, limit, msg_ind); body = bit_utils::bytes_to_int(body, limit, holdoff_ticks); - return SetGripperJawHoldoffRequest{ - .message_index = msg_ind, - .holdoff_ticks = holdoff_ticks}; + return SetGripperJawHoldoffRequest{.message_index = msg_ind, + .holdoff_ticks = holdoff_ticks}; } auto operator==(const SetGripperJawHoldoffRequest& other) const - -> bool = default; + -> bool = default; }; using GripperJawHoldoffRequest = Empty; struct GripperJawHoldoffResponse - : BaseMessage { + : BaseMessage { uint32_t message_index; uint32_t holdoff_ticks; template auto serialize(Output body, Limit limit) const -> uint8_t { auto iter = bit_utils::int_to_bytes(message_index, body, limit); - iter = bit_utils::int_to_bytes(static_cast(holdoff_ticks), iter, - limit); + iter = bit_utils::int_to_bytes(static_cast(holdoff_ticks), + iter, limit); return iter - body; } auto operator==(const GripperJawHoldoffResponse& other) const - -> bool = default; + -> bool = default; }; /** @@ -1576,7 +1574,7 @@ using ResponseMessageType = std::variant< BindSensorOutputResponse, GripperInfoResponse, TipActionResponse, PeripheralStatusResponse, BrushedMotorConfResponse, UpdateMotorPositionEstimationResponse, BaselineSensorResponse, - PushTipPresenceNotification, GetMotorUsageResponse, - GripperJawStateResponse, GripperJawHoldoffResponse>; + PushTipPresenceNotification, GetMotorUsageResponse, GripperJawStateResponse, + GripperJawHoldoffResponse>; } // namespace can::messages