From 59576ff7e9814f316d6a51c25fce69b2856b6d2f Mon Sep 17 00:00:00 2001 From: lgv Date: Mon, 30 Nov 2026 17:16:48 +0800 Subject: [PATCH] chore(ethercat): log cyclic timing on missed deadlines --- .../ethercat/src/ethercat_motor_bus_runtime.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/cmvr-es/devices/motor/bus_runtime/ethercat/src/ethercat_motor_bus_runtime.cpp b/cmvr-es/devices/motor/bus_runtime/ethercat/src/ethercat_motor_bus_runtime.cpp index b27bc454..3459d71a 100644 --- a/cmvr-es/devices/motor/bus_runtime/ethercat/src/ethercat_motor_bus_runtime.cpp +++ b/cmvr-es/devices/motor/bus_runtime/ethercat/src/ethercat_motor_bus_runtime.cpp @@ -645,12 +645,17 @@ void EthercatMotorBusRuntime::cyclicLoop_() } if (send_at >= next_timing_log && timing.min_send_interval != SteadyClock::duration::max()) { - CMVR_LOG(DEBUG) << "[EthercatMotorBusRuntime] cyclic timing: " << id_ - << ", period_us=" << period.count() - << ", min_send_interval_us=" << toMicroseconds(timing.min_send_interval) - << ", max_send_interval_us=" << toMicroseconds(timing.max_send_interval) - << ", max_wake_lateness_us=" << toMicroseconds(timing.max_wake_lateness) - << ", missed_deadlines=" << timing.missed_deadlines; + if (timing.missed_deadlines > 0) { + CMVR_LOG(DEBUG) << "[EthercatMotorBusRuntime] cyclic timing: " << id_ + << ", period_us=" << period.count() + << ", min_send_interval_us=" + << toMicroseconds(timing.min_send_interval) + << ", max_send_interval_us=" + << toMicroseconds(timing.max_send_interval) + << ", max_wake_lateness_us=" + << toMicroseconds(timing.max_wake_lateness) + << ", missed_deadlines=" << timing.missed_deadlines; + } timing = {}; next_timing_log = send_at + timing_log_period; }