From 3e95ade0046298ace8ef1634f70ad1babbac7443 Mon Sep 17 00:00:00 2001 From: rmackay9 Date: Sat, 21 Apr 2012 20:15:55 +0900 Subject: [PATCH] ArduCopter - changed optflow object to be APM2 version if necessary --- ArduCopter/ArduCopter.pde | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ArduCopter/ArduCopter.pde b/ArduCopter/ArduCopter.pde index 4871a93fa0..1e39b0abcc 100644 --- a/ArduCopter/ArduCopter.pde +++ b/ArduCopter/ArduCopter.pde @@ -199,7 +199,11 @@ static AP_Int8 *flight_modes = &g.flight_mode1; #endif #ifdef OPTFLOW_ENABLED - AP_OpticalFlow_ADNS3080 optflow(OPTFLOW_CS_PIN); + #if CONFIG_APM_HARDWARE == APM_HARDWARE_APM2 + AP_OpticalFlow_ADNS3080_APM2 optflow(OPTFLOW_CS_PIN); + #else + AP_OpticalFlow_ADNS3080 optflow(OPTFLOW_CS_PIN); + #endif #else AP_OpticalFlow optflow; #endif