diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-08 23:49:12 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-03-16 17:10:40 +0100 |
commit | fa0d98395db7e0a09160514758a990fef97f7252 (patch) | |
tree | 47c9aea4b9661140f7381ae7fb6ed6dca5f55711 /src | |
parent | bcb9bf1be8a854f9a9a5b2025ed9ee03b084ea44 (diff) |
Use static method now as they are all static. No need
to instanciate an object to decode now.
Change-Id: Id9bf378642ad66b7b4f39d909678ecc5ebb756cc
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src')
-rw-r--r-- | src/can/can-bus.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/can/can-bus.cpp b/src/can/can-bus.cpp index 4416452..06d3d89 100644 --- a/src/can/can-bus.cpp +++ b/src/can/can-bus.cpp @@ -70,8 +70,6 @@ void can_bus_t::can_decode_message() openxc_VehicleMessage vehicle_message; openxc_DynamicField search_key, decoded_message; - decoder_t decoder; - while(is_decoding_) { std::unique_lock<std::mutex> can_message_lock(can_message_mutex_); @@ -96,7 +94,7 @@ void can_bus_t::can_decode_message() DEBUG(binder_interface, "Nb elt matched string: %d", (int)s.count(std::string(sig.generic_name)));*/ if( s.find(sig->generic_name) != s.end() && afb_event_is_valid(s[sig->generic_name])) { - decoded_message = decoder.translateSignal(*sig, can_message, get_can_signals()); + decoded_message = decoder_t::translateSignal(*sig, can_message, get_can_signals()); openxc_SimpleMessage s_message = build_SimpleMessage(sig->generic_name, decoded_message); vehicle_message = build_VehicleMessage_with_SimpleMessage(openxc_DynamicField_Type::openxc_DynamicField_Type_NUM, s_message); |