From f7dc19554f8e3d45ea9c683f4fe57e02ab569183 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Sun, 24 May 2015 20:24:11 -0300 Subject: [PATCH] AP_ADC: use functor macros Functor is not yet being used but let's make is macro fallback to the previous Delegate implementation for easy of transition between the two. --- libraries/AP_ADC/AP_ADC_ADS1115.cpp | 2 +- libraries/AP_ADC/AP_ADC_ADS7844.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_ADC/AP_ADC_ADS1115.cpp b/libraries/AP_ADC/AP_ADC_ADS1115.cpp index df40ce8bab..a31f4af7c7 100644 --- a/libraries/AP_ADC/AP_ADC_ADS1115.cpp +++ b/libraries/AP_ADC/AP_ADC_ADS1115.cpp @@ -120,7 +120,7 @@ bool AP_ADC_ADS1115::init() _gain = ADS1115_PGA_4P096; _i2c_sem = hal.i2c->get_semaphore(); - hal.scheduler->register_timer_process(AP_HAL_MEMBERPROC(&AP_ADC_ADS1115::_update)); + hal.scheduler->register_timer_process(FUNCTOR_BIND_MEMBER(&AP_ADC_ADS1115::_update, void)); hal.scheduler->resume_timer_procs(); return true; diff --git a/libraries/AP_ADC/AP_ADC_ADS7844.cpp b/libraries/AP_ADC/AP_ADC_ADS7844.cpp index edc599decc..3dd0e59264 100644 --- a/libraries/AP_ADC/AP_ADC_ADS7844.cpp +++ b/libraries/AP_ADC/AP_ADC_ADS7844.cpp @@ -171,7 +171,7 @@ void AP_ADC_ADS7844::Init() _ch6_last_sample_time_micros = hal.scheduler->micros(); - hal.scheduler->register_timer_process(AP_HAL_MEMBERPROC(&AP_ADC_ADS7844::read)); + hal.scheduler->register_timer_process(FUNCTOR_BIND_MEMBER(&AP_ADC_ADS7844::read, void)); hal.scheduler->resume_timer_procs(); }