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.
This commit is contained in:
Lucas De Marchi 2015-05-24 20:24:11 -03:00 committed by Andrew Tridgell
parent e24c5349c8
commit f7dc19554f
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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();
}