diff options
Diffstat (limited to 'src/low-can-binding.cpp')
-rw-r--r-- | src/low-can-binding.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/low-can-binding.cpp b/src/low-can-binding.cpp index a2b54567..394d906a 100644 --- a/src/low-can-binding.cpp +++ b/src/low-can-binding.cpp @@ -223,13 +223,17 @@ extern "C" { can_bus_t& can_bus_manager = configuration_t::instance().get_can_bus_manager(); - /* Open CAN socket */ + /// Initialize CAN socket if(can_bus_manager.init_can_dev() == 0) { can_bus_manager.start_threads(); return 0; } + /// Initialize Diagnostic manager that will handle obd2 requests + diagnostic_manager_t& diag_manager = configuration_t::instance().get_diagnostic_manager(); + diag_manager.initialize(can_bus_manager.get_can_devices().front()); + ERROR(binder_interface, "There was something wrong with CAN device Initialization. Check your config file maybe"); return 1; } |