summaryrefslogtreecommitdiffstats
path: root/low-can-binding/can/can-bus.cpp
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 09:09:46 +0100
commit5afb52eec522f468cfad8d8540452985fd9a1a34 (patch)
treeb120269385aab80f8e9405296670492b611c8809 /low-can-binding/can/can-bus.cpp
parentcfe2298c30237186eb71c52f4105eb8534560e44 (diff)
Fix wrong filter condition (Thanks Parai Wang)
Change-Id: I7d3eccc2d4b99d543b669c7b3c8d7a38670d860f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'low-can-binding/can/can-bus.cpp')
-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 d5ad485f..9a98547b 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;
}