Skip to content

Commit

Permalink
add missing copying of read and write time in the copy constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
saikishor committed Aug 27, 2024
1 parent 881ee78 commit 89f1714
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hardware_interface/src/actuator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ Actuator::Actuator(Actuator && other) noexcept
{
std::lock_guard<std::recursive_mutex> lock(other.actuators_mutex_);
impl_ = std::move(other.impl_);
last_read_cycle_time_ = other.last_read_cycle_time_;
last_write_cycle_time_ = other.last_write_cycle_time_;
}

const rclcpp_lifecycle::State & Actuator::initialize(
Expand Down
1 change: 1 addition & 0 deletions hardware_interface/src/sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Sensor::Sensor(Sensor && other) noexcept
{
std::lock_guard<std::recursive_mutex> lock(other.sensors_mutex_);
impl_ = std::move(other.impl_);
last_read_cycle_time_ = other.last_read_cycle_time_;
}

const rclcpp_lifecycle::State & Sensor::initialize(
Expand Down
2 changes: 2 additions & 0 deletions hardware_interface/src/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ System::System(System && other) noexcept
{
std::lock_guard<std::recursive_mutex> lock(other.system_mutex_);
impl_ = std::move(other.impl_);
last_read_cycle_time_ = other.last_read_cycle_time_;
last_write_cycle_time_ = other.last_write_cycle_time_;
}

const rclcpp_lifecycle::State & System::initialize(
Expand Down

0 comments on commit 89f1714

Please sign in to comment.