diff --git a/crazyflie/deps/crazyflie_tools b/crazyflie/deps/crazyflie_tools index 36ea3d401..4b6255529 160000 --- a/crazyflie/deps/crazyflie_tools +++ b/crazyflie/deps/crazyflie_tools @@ -1 +1 @@ -Subproject commit 36ea3d40161db8f580dbb8846789bc036a2ccedd +Subproject commit 4b6255529698e421f802b020eabeafd63b14be66 diff --git a/crazyflie/src/crazyflie_server.cpp b/crazyflie/src/crazyflie_server.cpp index 4a71e0245..07734ed32 100644 --- a/crazyflie/src/crazyflie_server.cpp +++ b/crazyflie/src/crazyflie_server.cpp @@ -828,9 +828,11 @@ class CrazyflieROS } auto stats = cf_.connectionStatsDelta(); - float ack_rate = stats.sent_count / stats.ack_count; - if (ack_rate < min_ack_rate_) { - RCLCPP_WARN(logger_, "Ack rate: %.1f %%", ack_rate * 100); + if (stats.ack_count > 0) { + float ack_rate = stats.sent_count / stats.ack_count; + if (ack_rate < min_ack_rate_) { + RCLCPP_WARN(logger_, "Ack rate: %.1f %%", name_.c_str(), ack_rate * 100); + } } if (publish_stats_) {