diff options
author | José Bollo <jose.bollo@iot.bzh> | 2017-05-30 19:21:22 +0200 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-06-01 18:26:17 +0200 |
commit | 829e92779abd4ea0e79d558242523d9757436332 (patch) | |
tree | 110e85c08e5b581536513084e2fd70c75f415e6a /CAN-binder/low-can-binding/binding/low-can-cb.hpp | |
parent | 02deb38e600ba46a695963c6bb71ff13056761ee (diff) |
manage unset values with NAN
Change-Id: I144bc110864f507e57d5e4b7f03ee1c0aa61ff63
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'CAN-binder/low-can-binding/binding/low-can-cb.hpp')
-rw-r--r-- | CAN-binder/low-can-binding/binding/low-can-cb.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/CAN-binder/low-can-binding/binding/low-can-cb.hpp b/CAN-binder/low-can-binding/binding/low-can-cb.hpp index 1608db7..6490fdc 100644 --- a/CAN-binder/low-can-binding/binding/low-can-cb.hpp +++ b/CAN-binder/low-can-binding/binding/low-can-cb.hpp @@ -16,6 +16,7 @@ */ #include <string> +#include <cmath> #include "../utils/socketcan-bcm.hpp" struct event_filter_t @@ -23,6 +24,7 @@ struct event_filter_t float frequency; float min; float max; + event_filter_t() : frequency{NAN}, min{NAN}, max{NAN} {} }; class low_can_subscription_t @@ -44,7 +46,7 @@ private: * don't need an offset. */ /// Filtering part - struct event_filter_t event_filter_ = {-1.0, -1.0, -1.0}; + struct event_filter_t event_filter_; utils::socketcan_bcm_t socket_; public: |