aboutsummaryrefslogtreecommitdiffstats
path: root/CAN-binder
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-06-01 09:07:43 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-06-01 18:38:52 +0200
commit07cf0fca41024a41ba035f6e817a9590b686a992 (patch)
treeb5027899cc95d1b18ccd23e3c00e463a38a8b613 /CAN-binder
parentd51d8905b74e403dcaf2e70295bafa7113fae264 (diff)
Using isnan to define frequency.
Change-Id: Iba93089dc982644898540b286892c436229f38d2 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder')
-rw-r--r--CAN-binder/low-can-binding/binding/low-can-cb.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/CAN-binder/low-can-binding/binding/low-can-cb.cpp b/CAN-binder/low-can-binding/binding/low-can-cb.cpp
index dcfa8d4..eed0d76 100644
--- a/CAN-binder/low-can-binding/binding/low-can-cb.cpp
+++ b/CAN-binder/low-can-binding/binding/low-can-cb.cpp
@@ -162,7 +162,7 @@ int low_can_subscription_t::create_rx_filter()
float val = (float)(1 << can_signal_->get_bit_size()) - 1;
struct timeval freq;
- frequency_clock_t f = event_filter_.frequency > 0.0f ? frequency_clock_t(event_filter_.frequency) : can_signal_->get_frequency();
+ frequency_clock_t f = std::isnan(event_filter_.frequency) ? can_signal_->get_frequency() : frequency_clock_t(event_filter_.frequency);
freq = f.get_timeval_from_period();
bcm_msg.msg_head.opcode = RX_SETUP;