From f28b00c5dbac8d3506b5493303de8bc67ec674ce Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Thu, 24 Apr 2014 23:48:25 +0400 Subject: [PATCH] Renamed clock::setMinJump() --- .../stm32/driver/include/uavcan_stm32/clock.hpp | 2 +- libuavcan_drivers/stm32/driver/src/uc_stm32_clock.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libuavcan_drivers/stm32/driver/include/uavcan_stm32/clock.hpp b/libuavcan_drivers/stm32/driver/include/uavcan_stm32/clock.hpp index ca28bc5d0e..6027ac77ed 100644 --- a/libuavcan_drivers/stm32/driver/include/uavcan_stm32/clock.hpp +++ b/libuavcan_drivers/stm32/driver/include/uavcan_stm32/clock.hpp @@ -62,7 +62,7 @@ uavcan::UtcDuration getPrevUtcAdjustment(); * The parameter must be positive. * This function is thread safe. */ -void setMinJump(uavcan::UtcDuration adj); +void setMinUtcJump(uavcan::UtcDuration adj); } diff --git a/libuavcan_drivers/stm32/driver/src/uc_stm32_clock.cpp b/libuavcan_drivers/stm32/driver/src/uc_stm32_clock.cpp index 509a51a000..59cff163c0 100644 --- a/libuavcan_drivers/stm32/driver/src/uc_stm32_clock.cpp +++ b/libuavcan_drivers/stm32/driver/src/uc_stm32_clock.cpp @@ -41,7 +41,7 @@ uavcan::uint32_t utc_jump_cnt = 0; uavcan::int32_t utc_correction_usec_per_overflow_x16 = 0; uavcan::int64_t prev_adjustment = 0; -uavcan::UtcDuration min_jump = uavcan::UtcDuration::fromMSec(10); +uavcan::UtcDuration min_utc_jump = uavcan::UtcDuration::fromMSec(10); uavcan::uint64_t time_mono = 0; uavcan::uint64_t time_utc = 0; @@ -165,7 +165,7 @@ void adjustUtc(uavcan::UtcDuration adjustment) * Clock value adjustment * For small adjustments we will rely only on speed change */ - if (adjustment.getAbs() > min_jump || !utc_set) + if (adjustment.getAbs() > min_utc_jump || !utc_set) { const uavcan::int64_t adj_usec = adjustment.toUSec(); @@ -211,12 +211,12 @@ uavcan::UtcDuration getPrevUtcAdjustment() return uavcan::UtcDuration::fromUSec(prev_adjustment); } -void setMinJump(uavcan::UtcDuration adj) +void setMinUtcJump(uavcan::UtcDuration adj) { MutexLocker mlocker(mutex); if (adj.isPositive()) { - min_jump = adj; + min_utc_jump = adj; } else {