ArduCopter - changed optflow object to be APM2 version if necessary

This commit is contained in:
rmackay9 2012-04-21 20:15:55 +09:00
parent 919f004b27
commit 3e95ade004
1 changed files with 5 additions and 1 deletions

View File

@ -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