Skip to content

Commit

Permalink
Fix hardware component unconfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
sahand-ghaffari-ocado committed Sep 16, 2024
1 parent 5d839e6 commit 420cb16
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions hardware_interface/src/actuator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ const rclcpp_lifecycle::State & Actuator::cleanup()
{
if (impl_->get_state().id() == lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE)
{
impl_->set_state(rclcpp_lifecycle::State(
lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED,
lifecycle_state_names::UNCONFIGURED));
switch (impl_->on_cleanup(impl_->get_state()))
{
case CallbackReturn::SUCCESS:
impl_->set_state(rclcpp_lifecycle::State(
lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED,
lifecycle_state_names::UNCONFIGURED));
break;
case CallbackReturn::FAILURE:
case CallbackReturn::ERROR:
Expand Down
6 changes: 3 additions & 3 deletions hardware_interface/src/sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ const rclcpp_lifecycle::State & Sensor::cleanup()
{
if (impl_->get_state().id() == lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE)
{
impl_->set_state(rclcpp_lifecycle::State(
lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED,
lifecycle_state_names::UNCONFIGURED));
switch (impl_->on_cleanup(impl_->get_state()))
{
case CallbackReturn::SUCCESS:
impl_->set_state(rclcpp_lifecycle::State(
lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED,
lifecycle_state_names::UNCONFIGURED));
break;
case CallbackReturn::FAILURE:
case CallbackReturn::ERROR:
Expand Down
6 changes: 3 additions & 3 deletions hardware_interface/src/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ const rclcpp_lifecycle::State & System::cleanup()
{
if (impl_->get_state().id() == lifecycle_msgs::msg::State::PRIMARY_STATE_INACTIVE)
{
impl_->set_state(rclcpp_lifecycle::State(
lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED,
lifecycle_state_names::UNCONFIGURED));
switch (impl_->on_cleanup(impl_->get_state()))
{
case CallbackReturn::SUCCESS:
impl_->set_state(rclcpp_lifecycle::State(
lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED,
lifecycle_state_names::UNCONFIGURED));
break;
case CallbackReturn::FAILURE:
case CallbackReturn::ERROR:
Expand Down

0 comments on commit 420cb16

Please sign in to comment.