diff --git a/ArduCopterMega/ArduCopterMega.pde b/ArduCopterMega/ArduCopterMega.pde index b4b0430bad..1343c96fe1 100644 --- a/ArduCopterMega/ArduCopterMega.pde +++ b/ArduCopterMega/ArduCopterMega.pde @@ -175,6 +175,9 @@ static AP_Int8 *flight_modes = &g.flight_mode1; AP_GPS_HIL g_gps_driver(NULL); AP_Compass_HIL compass; // never used AP_IMU_Shim imu; // never used + #ifdef OPTFLOW_ENABLED + AP_OpticalFlow_ADNS3080 optflow; + #endif static int32_t gps_base_alt; #else #error Unrecognised HIL_MODE setting. @@ -1578,4 +1581,4 @@ static void auto_throttle() invalid_throttle = false; //Serial.printf("wp:%d, \te:%d \tt%d \t%d\n", (int)next_WP.alt, (int)altitude_error, nav_throttle, g.rc_3.servo_out); -} +}