mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-19 04:52:12 +01:00
Merge branch 'corvuscorax/OP-1875_restart_ekf_on_magsource_change' into rel-nano-15.05
This commit is contained in:
commit
1e7c7ff620
@ -42,6 +42,7 @@
|
|||||||
#include <gpsvelocitysensor.h>
|
#include <gpsvelocitysensor.h>
|
||||||
#include <homelocation.h>
|
#include <homelocation.h>
|
||||||
#include <auxmagsensor.h>
|
#include <auxmagsensor.h>
|
||||||
|
#include <auxmagsettings.h>
|
||||||
|
|
||||||
#include <gyrostate.h>
|
#include <gyrostate.h>
|
||||||
#include <accelstate.h>
|
#include <accelstate.h>
|
||||||
@ -254,7 +255,7 @@ static const filterPipeline *ekf13Queue = &(filterPipeline) {
|
|||||||
|
|
||||||
static void settingsUpdatedCb(UAVObjEvent *objEv);
|
static void settingsUpdatedCb(UAVObjEvent *objEv);
|
||||||
static void sensorUpdatedCb(UAVObjEvent *objEv);
|
static void sensorUpdatedCb(UAVObjEvent *objEv);
|
||||||
static void homeLocationUpdatedCb(UAVObjEvent *objEv);
|
static void criticalConfigUpdatedCb(UAVObjEvent *objEv);
|
||||||
static void StateEstimationCb(void);
|
static void StateEstimationCb(void);
|
||||||
|
|
||||||
static inline int32_t maxint32_t(int32_t a, int32_t b)
|
static inline int32_t maxint32_t(int32_t a, int32_t b)
|
||||||
@ -292,7 +293,8 @@ int32_t StateEstimationInitialize(void)
|
|||||||
|
|
||||||
RevoSettingsConnectCallback(&settingsUpdatedCb);
|
RevoSettingsConnectCallback(&settingsUpdatedCb);
|
||||||
|
|
||||||
HomeLocationConnectCallback(&homeLocationUpdatedCb);
|
HomeLocationConnectCallback(&criticalConfigUpdatedCb);
|
||||||
|
AuxMagSettingsConnectCallback(&criticalConfigUpdatedCb);
|
||||||
|
|
||||||
GyroSensorConnectCallback(&sensorUpdatedCb);
|
GyroSensorConnectCallback(&sensorUpdatedCb);
|
||||||
AccelSensorConnectCallback(&sensorUpdatedCb);
|
AccelSensorConnectCallback(&sensorUpdatedCb);
|
||||||
@ -538,9 +540,9 @@ static void settingsUpdatedCb(__attribute__((unused)) UAVObjEvent *ev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback for eventdispatcher when HomeLocation has been updated
|
* Callback for eventdispatcher when HomeLocation or other critical configs (auxmagsettings, ...) has been updated
|
||||||
*/
|
*/
|
||||||
static void homeLocationUpdatedCb(__attribute__((unused)) UAVObjEvent *ev)
|
static void criticalConfigUpdatedCb(__attribute__((unused)) UAVObjEvent *ev)
|
||||||
{
|
{
|
||||||
// Ask for a filter init (necessary for LLA filter)
|
// Ask for a filter init (necessary for LLA filter)
|
||||||
// Only possible if disarmed
|
// Only possible if disarmed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user