1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-17 02:52:12 +01:00

prevent positionSensor updates if GPS lock is low quality. Sometimes bad updates are worse than no updates.

This commit is contained in:
Corvus Corax 2013-06-22 23:15:10 +02:00
parent 3392622d2b
commit 4bf934ae69

View File

@ -277,9 +277,6 @@ static void gpsTask(__attribute__((unused)) void *parameters)
} else if ((gpspositionsensor.Status == GPSPOSITIONSENSOR_STATUS_FIX3D) &&
(gpspositionsensor.Latitude != 0 || gpspositionsensor.Longitude != 0)) {
AlarmsSet(SYSTEMALARMS_ALARM_GPS, SYSTEMALARMS_ALARM_WARNING);
#ifdef PIOS_GPS_SETS_POSITIONSENSOR
setPositionSensor(&gpspositionsensor);
#endif
} else {
AlarmsSet(SYSTEMALARMS_ALARM_GPS, SYSTEMALARMS_ALARM_CRITICAL);
}