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

OP-1412 do not dicard mags after init

This commit is contained in:
Corvus Corax 2014-07-23 22:40:43 +02:00
parent 2740631e06
commit a199fd1cb0

View File

@ -206,10 +206,10 @@ static filterResult filter(stateFilter *self, stateEstimation *state)
this->work.updated |= state->updated;
// check magnetometer alarm, discard any magnetometer readings if not OK
// this will also delay initialization
// during initialization phase (but let them through afterwards)
SystemAlarmsAlarmData alarms;
SystemAlarmsAlarmGet(&alarms);
if (alarms.Magnetometer != SYSTEMALARMS_ALARM_OK) {
if (alarms.Magnetometer != SYSTEMALARMS_ALARM_OK && !this->inited) {
UNSET_MASK(state->updated, SENSORUPDATES_mag);
UNSET_MASK(this->work.updated, SENSORUPDATES_mag);
}