diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-11-08 09:09:46 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-11-08 09:09:46 +0100 |
commit | 5afb52eec522f468cfad8d8540452985fd9a1a34 (patch) | |
tree | b120269385aab80f8e9405296670492b611c8809 /low-can-binding | |
parent | cfe2298c30237186eb71c52f4105eb8534560e44 (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')
-rw-r--r-- | low-can-binding/can/can-bus.cpp | 2 |
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 d5ad485..9a98547 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; } |