diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-02-27 20:25:52 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-02-27 20:25:52 +0100 |
commit | 06acf7a42da0ab605d9dac3c4c0c66f426a06d17 (patch) | |
tree | bf31e8870354bc88b1c217e29cfd69205e837dce /src/can_decode_message.cpp | |
parent | f06cda1411cc087ca551e6e9bffa9cb2dc79b4ca (diff) |
Changed the decoding function
Change-Id: Ib27fb13d4fb7959509400a3c2eff2859d1ce9c2b
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/can_decode_message.cpp')
-rw-r--r-- | src/can_decode_message.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/can_decode_message.cpp b/src/can_decode_message.cpp index 3c1825d1..c311e98a 100644 --- a/src/can_decode_message.cpp +++ b/src/can_decode_message.cpp @@ -32,7 +32,6 @@ void can_decode_message(can_bus_t &can_bus) std::vector <CanSignal>::iterator signals_i; openxc_VehicleMessage vehicle_message; openxc_DynamicField search_key, decoded_message; - bool send = true; decoder_t decoder; @@ -49,7 +48,7 @@ void can_decode_message(can_bus_t &can_bus) signals = find_can_signals(search_key); /* Decoding the message ! Don't kill the messenger ! */ - for(const auto& sig : signals) + for(auto& sig : signals) { { std::lock_guard<std::mutex> subscribed_signals_lock(subscribed_signals_mutex); @@ -59,7 +58,7 @@ void can_decode_message(can_bus_t &can_bus) if(it_event != subscribed_signals.end() && afb_event_is_valid(it_event->second)) { - decoded_message = decoder.decodeSignal(sig, can_message, getSignals(), &send); + decoded_message = decoder.translateSignal(sig, can_message, getSignals()); openxc_SimpleMessage s_message = build_SimpleMessage(sig.genericName, decoded_message); vehicle_message = build_VehicleMessage_with_SimpleMessage(openxc_DynamicField_Type::openxc_DynamicField_Type_NUM, s_message); |