summaryrefslogtreecommitdiffstats
path: root/src/can/can-bus.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-10 15:53:27 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-16 17:10:41 +0100
commit093d7a35c23c65ffef888ded40aea9e77f0e4975 (patch)
treee19ad22f612560f0000aa6076fd0d59226bc9323 /src/can/can-bus.cpp
parent127d46e303af839a2b160051722d38e6056dc10b (diff)
Manage prefix on CAN and OBD2 prefix. Searching signals
is made on generic_name (without prefix) and returned vector of string is filled with name with prefix. Then you can process on them based upon their name differently. OBD2 signals will generated recurring request on diagnostic manager and decoding will not be handled the same way too. Change-Id: I2c5239ef49661941a0a748debe0bd536b2954b3a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/can/can-bus.cpp')
-rw-r--r--src/can/can-bus.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/can/can-bus.cpp b/src/can/can-bus.cpp
index a8a474cf..7a18ce8f 100644
--- a/src/can/can-bus.cpp
+++ b/src/can/can-bus.cpp
@@ -94,7 +94,7 @@ void can_bus_t::can_decode_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_generic_name()) != s.end() && afb_event_is_valid(s[sig->get_generic_name()]))
+ if( s.find(sig->get_name()) != s.end() && afb_event_is_valid(s[sig->get_name()]))
{
decoded_message = decoder_t::translateSignal(*sig, can_message, configuration_t::instance().get_can_signals());