diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-02-21 13:21:59 +0000 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-02-22 12:15:09 +0100 |
commit | dae58e000ef198f7fa09718c60d7a7f2250fc2ce (patch) | |
tree | f02fecdb5da402561207bf4a92c1526ecf1bf513 /src/obd2.cpp | |
parent | b157cc6c5942ed0dfae672d2d3e32e0d7c6cb2ad (diff) |
Fix: force to pass a ref at threads launch
Change-Id: Ife4206d6f6dce6888157239cce56b0040e3d2cf4
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src/obd2.cpp')
-rw-r--r-- | src/obd2.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/obd2.cpp b/src/obd2.cpp index 25416cd..536df66 100644 --- a/src/obd2.cpp +++ b/src/obd2.cpp @@ -15,10 +15,11 @@ * limitations under the License. */ +#include "obd2.hpp" -void shims_logger(afb_binding_interface *itf) +void shims_logger(const char* m, const struct afb_binding_interface *interface) { - //DEBUG(itf, "dd"); + DEBUG(interface, "%s", m); } void shims_timer() @@ -28,15 +29,16 @@ void shims_timer() /* * Will scan for supported Obd2 pids */ -obd2_handler_t::obd2_handler_t(afb_binding_interface *itf, can_bus_t cb) +obd2_handler_t::obd2_handler_t(const struct afb_binding_interface *interface, can_bus_t can_bus) + : can_bus_{can_bus} { - can_bus_t can_bus = cb; - DiagnosticShims shims = diagnostic_init_shims(shims_logger, can_bus.send_can_message, NULL); + can_bus_t can_bus_ = can_bus; + DiagnosticShims shims_ = diagnostic_init_shims(shims_logger, can_bus.send_can_message, NULL); - int n_pids, i; + int n_pids_, i_; - n_pids = size(Obd2Pid); - for(i=0; i<=n_pids; i++) + n_pids_ = size(Obd2Pid); + for(i_=0; i_<=n_pids_; i_++) { } } |