Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal-gorecki committed Nov 20, 2023
1 parent b9cceb2 commit 0e1d1e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions healthcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void msg_callback(const nav_msgs::msg::Odometry::SharedPtr msg) {
last_msg_time = std::chrono::steady_clock::now();
}

void healthy_check(const rclcpp::Node::SharedPtr &node) {
void healthy_check() {
std::chrono::steady_clock::time_point current_time =
std::chrono::steady_clock::now();
std::chrono::duration<double> elapsed_time = current_time - last_msg_time;
Expand All @@ -39,7 +39,7 @@ int main(int argc, char *argv[]) {

while (rclcpp::ok()) {
rclcpp::spin_some(node);
healthy_check(node);
healthy_check();
std::this_thread::sleep_for(LOOP_PERIOD);
}

Expand Down

0 comments on commit 0e1d1e5

Please sign in to comment.