aboutsummaryrefslogtreecommitdiffstats
path: root/src/can/can-bus.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-08 23:49:12 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-16 17:10:40 +0100
commitfa0d98395db7e0a09160514758a990fef97f7252 (patch)
tree47c9aea4b9661140f7381ae7fb6ed6dca5f55711 /src/can/can-bus.cpp
parentbcb9bf1be8a854f9a9a5b2025ed9ee03b084ea44 (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/can/can-bus.cpp')
-rw-r--r--src/can/can-bus.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/can/can-bus.cpp b/src/can/can-bus.cpp
index 4416452b..06d3d89c 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);