1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

Fixup: Shouldn't update gps until home location is set

This commit is contained in:
James Cotton 2012-03-02 18:32:23 -06:00
parent 7a3ec3e173
commit 98b1a21921

View File

@ -477,7 +477,7 @@ static int32_t updateAttitudeINSGPS(bool first_run, bool outdoor_mode)
HomeLocationGet(&home);
// Have a minimum requirement for gps usage
gps_updated &= (gpsData.Satellites >= 7) && (gpsData.PDOP <= 4.0f);
gps_updated &= (gpsData.Satellites >= 7) && (gpsData.PDOP <= 4.0f) && (homeLocation.Set == HOMELOCATION_SET_TRUE);
if (!inited)
AlarmsSet(SYSTEMALARMS_ALARM_ATTITUDE,SYSTEMALARMS_ALARM_ERROR);