1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-31 16:52:10 +01:00

Merged in f5soh/librepilot/LP-273_Reset_Mag_Alarm (pull request #214)

LP-273 Reinit Mag alarm while switching to Complementary
This commit is contained in:
Philippe Renon 2016-04-04 21:26:38 +02:00
commit d916fde887

View File

@ -383,6 +383,8 @@ static void StateEstimationCb(void)
switch ((RevoSettingsFusionAlgorithmOptions)revoSettings.FusionAlgorithm) {
case REVOSETTINGS_FUSIONALGORITHM_BASICCOMPLEMENTARY:
newFilterChain = cfQueue;
// reinit Mag alarm
AlarmsSet(SYSTEMALARMS_ALARM_MAGNETOMETER, SYSTEMALARMS_ALARM_UNINITIALISED);
break;
case REVOSETTINGS_FUSIONALGORITHM_COMPLEMENTARYMAG:
newFilterChain = cfmiQueue;
@ -414,7 +416,7 @@ static void StateEstimationCb(void)
AlarmsSet(SYSTEMALARMS_ALARM_ATTITUDE, SYSTEMALARMS_ALARM_ERROR);
return;
} else {
// set new fusion algortithm
// set new fusion algorithm
filterChain = newFilterChain;
fusionAlgorithm = revoSettings.FusionAlgorithm;
}