diff --git a/libraries/AP_OpticalFlow/AP_OpticalFlow_ADNS3080.cpp b/libraries/AP_OpticalFlow/AP_OpticalFlow_ADNS3080.cpp index 2ba7f7651e..fc316adf0a 100644 --- a/libraries/AP_OpticalFlow/AP_OpticalFlow_ADNS3080.cpp +++ b/libraries/AP_OpticalFlow/AP_OpticalFlow_ADNS3080.cpp @@ -102,7 +102,7 @@ finish: // if device is working register the global static read function to // be called at 1khz if( retvalue ) { - hal.scheduler->register_timer_process(reinterpret_cast(&AP_OpticalFlow_ADNS3080::read), this); + hal.scheduler->register_timer_process(AP_HAL_MEMBERPROC(&AP_OpticalFlow_ADNS3080::read)); } // resume timer