Skip to content

Commit

Permalink
remove unnecessary mutex lock
Browse files Browse the repository at this point in the history
  • Loading branch information
yushi-minemura committed Nov 7, 2024
1 parent 320e44c commit d70c656
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions odrive_node/src/odrive_can_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,7 @@ void ODriveCanNode::deinit() {
if (axis_idle_on_shutdown_) {
struct can_frame frame;
frame.can_id = node_id_ << 5 | CmdId::kSetAxisState;
{
std::unique_lock<std::mutex> guard(axis_state_mutex_);
write_le<uint32_t>(ODriveAxisState::AXIS_STATE_IDLE, frame.data);
}
write_le<uint32_t>(ODriveAxisState::AXIS_STATE_IDLE, frame.data);
frame.can_dlc = 4;
can_intf_.send_can_frame(frame);
}
Expand Down

0 comments on commit d70c656

Please sign in to comment.