AP_AHRS: fixed a build warning

This commit is contained in:
Andrew Tridgell 2016-12-31 08:53:16 +11:00
parent a276b9c271
commit 7a5ee29b6e

View File

@ -1376,9 +1376,10 @@ void AP_AHRS_NavEKF::setTouchdownExpected(bool val)
bool AP_AHRS_NavEKF::getGpsGlitchStatus() bool AP_AHRS_NavEKF::getGpsGlitchStatus()
{ {
nav_filter_status ekf_status; nav_filter_status ekf_status {};
get_filter_status(ekf_status); if (!get_filter_status(ekf_status)) {
return false;
}
return ekf_status.flags.gps_glitching; return ekf_status.flags.gps_glitching;
} }