aboutsummaryrefslogtreecommitdiffstats
path: root/src/can
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-03-10 15:14:56 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-03-16 17:10:41 +0100
commit7b131462d3b84f9fd5e87938c5f26d951d39a6cb (patch)
tree1e5ac1db9bb31f33707701f94ba3b418a777fc98 /src/can
parent390edc67f93cb9447fb4585a12f58a63754c56d5 (diff)
Instead of a global pointer, config is now a Singleton.
Change-Id: I0cfc34f330c531ba5f070542a1cb723be4bcc70a Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/can')
-rw-r--r--src/can/can-bus.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/can/can-bus.cpp b/src/can/can-bus.cpp
index 4ddf6c82..a8a474cf 100644
--- a/src/can/can-bus.cpp
+++ b/src/can/can-bus.cpp
@@ -81,7 +81,7 @@ void can_bus_t::can_decode_message()
/* First we have to found which can_signal_t it is */
search_key = build_DynamicField((double)can_message.get_id());
signals.clear();
- config->find_can_signals(search_key, signals);
+ configuration_t::instance().find_can_signals(search_key, signals);
/* Decoding the message ! Don't kill the messenger ! */
for(auto& sig : signals)
@@ -96,7 +96,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->get_generic_name()) != s.end() && afb_event_is_valid(s[sig->get_generic_name()]))
{
- decoded_message = decoder_t::translateSignal(*sig, can_message, config->get_can_signals());
+ decoded_message = decoder_t::translateSignal(*sig, can_message, configuration_t::instance().get_can_signals());
openxc_SimpleMessage s_message = build_SimpleMessage(sig->get_generic_name(), decoded_message);
vehicle_message = build_VehicleMessage_with_SimpleMessage(openxc_DynamicField_Type::openxc_DynamicField_Type_NUM, s_message);