From 6635c2ace392b2dec41b8b7f4398ebb52f1f985b Mon Sep 17 00:00:00 2001 From: Yuichi Kusakabe Date: Fri, 21 Jul 2017 12:57:20 +0900 Subject: Fix canmessage default frequency Default CAN message is frequency_cloc_t(0.0)=1Hz setting. But this value is not recived under 1000ms CAN data. This patch is default frequency change 2000Hz(0.5ms). Change-Id: I3c099b75da244ee147b67bc3ce7a95aea2bbf6fa Signed-off-by: Yuichi Kusakabe --- low-can-binding/utils/timer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'low-can-binding') diff --git a/low-can-binding/utils/timer.cpp b/low-can-binding/utils/timer.cpp index f3cdd5e..d21b747 100644 --- a/low-can-binding/utils/timer.cpp +++ b/low-can-binding/utils/timer.cpp @@ -59,7 +59,7 @@ frequency_clock_t::frequency_clock_t(float frequency) : unit_{1000000}, frequency_{frequency}, last_tick_{0}, time_function_{nullptr} { if(frequency_ <= 0) - frequency_ = 1; + frequency_ = 2000; } frequency_clock_t::frequency_clock_t(float frequency, uint64_t last_tick, time_function_t time_function) @@ -126,4 +126,4 @@ uint64_t frequency_clock_t::get_last_tick() const void frequency_clock_t::tick(uint64_t timestamp) { last_tick_ = timestamp; -} \ No newline at end of file +} -- cgit 1.2.3-korg