From d83dbb38b43a72a953f298ad0df3dcd591fab665 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 30 Sep 2013 17:01:48 +1000 Subject: [PATCH] AP_ADC: updates for AP_HAL::MemberProc --- libraries/AP_ADC/AP_ADC_ADS7844.cpp | 2 +- libraries/AP_ADC/AP_ADC_HIL.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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