From 26304b7b0a30407a5ab02b7a971596691e3c4f89 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Wed, 8 Nov 2017 09:09:46 +0100 Subject: Fix wrong filter condition (Thanks Parai Wang) Change-Id: I7d3eccc2d4b99d543b669c7b3c8d7a38670d860f Signed-off-by: Romain Forlot --- low-can-binding/can/can-bus.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit 1.2.3-korg