summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-11-08 09:09:46 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-11-08 10:00:14 +0100
commit26304b7b0a30407a5ab02b7a971596691e3c4f89 (patch)
tree345d40c5b46b14bdfe31fe78d0501a0269d6e1b6
parented4eb586b263af7ed48c5cdbf12a20eff2a17686 (diff)
Fix wrong filter condition (Thanks Parai Wang)
Change-Id: I7d3eccc2d4b99d543b669c7b3c8d7a38670d860f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
-rw-r--r--low-can-binding/can/can-bus.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/low-can-binding/can/can-bus.cpp b/low-can-binding/can/can-bus.cpp
index 1b0e186..46c2788 100644
--- a/low-can-binding/can/can-bus.cpp
+++ b/low-can-binding/can/can-bus.cpp
@@ -56,7 +56,7 @@ bool can_bus_t::apply_filter(const openxc_VehicleMessage& vehicle_message, std::
float min = std::isnan(can_subscription->get_min()) ? -INFINITY : can_subscription->get_min();
float max = std::isnan(can_subscription->get_max()) ? INFINITY : can_subscription->get_max();
double value = get_numerical_from_DynamicField(vehicle_message);
- send = (value < min && value > max) ? false : true;
+ send = (value < min || value > max) ? false : true;
}
return send;
}