mirror of https://github.com/ArduPilot/ardupilot
Copter: correct compilation when optical flow is disabled
This commit is contained in:
parent
9605639070
commit
d652bd4455
|
@ -110,7 +110,11 @@ bool Copter::ekf_over_threshold()
|
|||
if (mag_variance.length() >= g.fs_ekf_thresh) {
|
||||
over_thresh_count++;
|
||||
}
|
||||
if (!optflow.healthy() && (vel_variance >= (2.0f * g.fs_ekf_thresh))) {
|
||||
bool optflow_healthy = false;
|
||||
#if OPTFLOW == ENABLED
|
||||
optflow_healthy = optflow.healthy();
|
||||
#endif
|
||||
if (!optflow_healthy && (vel_variance >= (2.0f * g.fs_ekf_thresh))) {
|
||||
over_thresh_count += 2;
|
||||
} else if (vel_variance >= g.fs_ekf_thresh) {
|
||||
over_thresh_count++;
|
||||
|
|
Loading…
Reference in New Issue