Skip to content

Commit

Permalink
less code is better
Browse files Browse the repository at this point in the history
Co-authored-by: Christoph Fröhlich <[email protected]>
  • Loading branch information
bmagyar and christophfroehlich authored Dec 2, 2024
1 parent b584ec7 commit 2edbe33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions diff_drive_controller/src/diff_drive_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,7 @@ bool DiffDriveController::reset()
subscriber_is_active_ = false;
velocity_command_subscriber_.reset();

received_velocity_msg_ptr_.set([](std::shared_ptr<TwistStamped> & stored_value)
{ stored_value = nullptr; });
received_velocity_msg_ptr_.set(nullptr);
is_halted = false;
return true;
}
Expand Down
3 changes: 1 addition & 2 deletions tricycle_controller/src/tricycle_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,7 @@ bool TricycleController::reset()
subscriber_is_active_ = false;
velocity_command_subscriber_.reset();

received_velocity_msg_ptr_.set([](std::shared_ptr<TwistStamped> & stored_value)
{ stored_value = nullptr; });
received_velocity_msg_ptr_.set(nullptr);
is_halted = false;
return true;
}
Expand Down

0 comments on commit 2edbe33

Please sign in to comment.