Skip to content

Commit 677f9bf

Browse files
committed
amend formatting pass
1 parent 03ce3c3 commit 677f9bf

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/ODriveCAN.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,19 @@
88

99
#define REQUEST_PENDING 0xff
1010

11+
// clang-format off
12+
// (clang-format gets confused by the lambdas inside the macro)
1113
#define CREATE_CAN_INTF_WRAPPER(TIntf) \
1214
static inline ODriveCanIntfWrapper wrap_can_intf(TIntf& intf) { \
1315
return { \
1416
&intf, \
15-
([](void* intf, uint32_t id, uint8_t length, const uint8_t* data) { \
17+
[](void* intf, uint32_t id, uint8_t length, const uint8_t* data) { \
1618
return sendMsg(*(TIntf*)intf, id, length, data); \
17-
}), \
19+
}, \
1820
[](void* intf) { pumpEvents(*(TIntf*)intf); }, \
1921
}; \
2022
}
21-
23+
// clang-format on
2224

2325
struct ODriveCanIntfWrapper {
2426
bool sendMsg(uint32_t id, uint8_t length, const uint8_t* data) { return (*send_msg_)(can_intf_, id, length, data); }
@@ -31,7 +33,7 @@ struct ODriveCanIntfWrapper {
3133

3234
class ODriveCAN {
3335
public:
34-
ODriveCAN(const ODriveCanIntfWrapper& can_intf, uint32_t node_id) : can_intf_(can_intf), node_id_(node_id){};
36+
ODriveCAN(const ODriveCanIntfWrapper& can_intf, uint32_t node_id) : can_intf_(can_intf), node_id_(node_id) {}
3537

3638
/**
3739
* @brief Clear all errors on the ODrive.

0 commit comments

Comments
 (0)