diff --git a/ArduCopter/Log.pde b/ArduCopter/Log.pde index 732ca7a172..4595f0ce7f 100644 --- a/ArduCopter/Log.pde +++ b/ArduCopter/Log.pde @@ -491,7 +491,11 @@ static void Log_Write_Attitude() DataFlash.WriteBlock(&pkt, sizeof(pkt)); #if AP_AHRS_NAVEKF_AVAILABLE + #if OPTFLOW == ENABLED DataFlash.Log_Write_EKF(ahrs,optflow.enabled()); + #else + DataFlash.Log_Write_EKF(ahrs,false); + #endif DataFlash.Log_Write_AHRS2(ahrs); #endif #if CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL