From fa0d98395db7e0a09160514758a990fef97f7252 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Wed, 8 Mar 2017 23:49:12 +0100 Subject: 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 --- src/can/can-bus.cpp | 4 +--- 1 file changed, 1 insertion(+), 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 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); -- cgit 1.2.3-korg