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:
parent
e24c5349c8
commit
f7dc19554f
@ -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;
|
||||
|
@ -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();
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user