diff --git a/libraries/AP_ADC/AP_ADC_ADS7844.cpp b/libraries/AP_ADC/AP_ADC_ADS7844.cpp index af3ee6bac6..edc599decc 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( reinterpret_cast(&AP_ADC_ADS7844::read), this ); + hal.scheduler->register_timer_process(AP_HAL_MEMBERPROC(&AP_ADC_ADS7844::read)); hal.scheduler->resume_timer_procs(); } diff --git a/libraries/AP_ADC/AP_ADC_HIL.cpp b/libraries/AP_ADC/AP_ADC_HIL.cpp index b60ed390a1..806aea5f93 100644 --- a/libraries/AP_ADC/AP_ADC_HIL.cpp +++ b/libraries/AP_ADC/AP_ADC_HIL.cpp @@ -49,7 +49,7 @@ AP_ADC_HIL::AP_ADC_HIL() void AP_ADC_HIL::Init() { - hal.scheduler->register_timer_process( reinterpret_cast(&AP_ADC_HIL::read), this); + hal.scheduler->register_timer_process( AP_HAL_MEMBERPROC(&AP_ADC_HIL::read)); } // Read one channel value