From 63d31e29e366fb9dd85debc897fdbc91d9cb2e42 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Mon, 13 Mar 2017 23:07:33 +0100 Subject: Search into generic_name as well as name + prefix, but always register generic_name into subscribed_signals. It will be the output on event and make easier to find the subscribed signals into the map without prefix. Change-Id: Iaf0060bedb54003b0c77121afd2bd35d832dba25 Signed-off-by: Romain Forlot --- src/can/can-bus.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/can/can-bus.cpp') diff --git a/src/can/can-bus.cpp b/src/can/can-bus.cpp index dfecea96..ebfd7cec 100644 --- a/src/can/can-bus.cpp +++ b/src/can/can-bus.cpp @@ -74,7 +74,7 @@ int can_bus_t::process_can_signals(can_message_t& can_message) DEBUG(binder_interface, "Operator[] key string: %s, event valid? %d", sig.generic_name, afb_event_is_valid(s[std::string(sig.generic_name)])); DEBUG(binder_interface, "Nb elt matched char: %d", (int)s.count(sig.generic_name)); DEBUG(binder_interface, "Nb elt matched string: %d", (int)s.count(std::string(sig.generic_name)));*/ - if( s.find(sig->get_name()) != s.end() && afb_event_is_valid(s[sig->get_name()])) + if( s.find(sig->get_generic_name()) != s.end() && afb_event_is_valid(s[sig->get_generic_name()])) { decoded_message = decoder_t::translateSignal(*sig, can_message, configuration_t::instance().get_can_signals()); -- cgit 1.2.3-korg