summaryrefslogtreecommitdiffstats
path: root/low-can-binding/utils
diff options
context:
space:
mode:
authorYuichi Kusakabe <yuichi.kusakabe@jp.fujitsu.com>2017-07-21 12:57:20 +0900
committerYuichi Kusakabe <yuichi.kusakabe@jp.fujitsu.com>2017-07-21 12:57:20 +0900
commit6635c2ace392b2dec41b8b7f4398ebb52f1f985b (patch)
tree24f01464b7015b4ac0a63b090457b808ac758a93 /low-can-binding/utils
parent9295346830bae064dddb4e0a12a69ddc9c120123 (diff)
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 <yuichi.kusakabe@jp.fujitsu.com>
Diffstat (limited to 'low-can-binding/utils')
-rw-r--r--low-can-binding/utils/timer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/low-can-binding/utils/timer.cpp b/low-can-binding/utils/timer.cpp
index f3cdd5e7..d21b7474 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
+}