mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-30 15:52:12 +01:00
update settings during initialisation only
This commit is contained in:
parent
a03f87efb5
commit
a286cc6b24
@ -80,7 +80,6 @@ void filterCFInitialize(stateFilter *handle)
|
|||||||
handle->init = &initwithoutmag;
|
handle->init = &initwithoutmag;
|
||||||
handle->filter = &filter;
|
handle->filter = &filter;
|
||||||
FlightStatusConnectCallback(&flightStatusUpdatedCb);
|
FlightStatusConnectCallback(&flightStatusUpdatedCb);
|
||||||
HomeLocationConnectCallback(&flightStatusUpdatedCb);
|
|
||||||
flightStatusUpdatedCb(NULL);
|
flightStatusUpdatedCb(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,6 +106,7 @@ static int32_t maininit(void)
|
|||||||
first_run = 1;
|
first_run = 1;
|
||||||
accelUpdated = 0;
|
accelUpdated = 0;
|
||||||
AttitudeSettingsGet(&attitudeSettings);
|
AttitudeSettingsGet(&attitudeSettings);
|
||||||
|
HomeLocationGet(&homeLocation);
|
||||||
|
|
||||||
const float fakeDt = 0.0025f;
|
const float fakeDt = 0.0025f;
|
||||||
if (attitudeSettings.AccelTau < 0.0001f) {
|
if (attitudeSettings.AccelTau < 0.0001f) {
|
||||||
@ -401,7 +401,6 @@ static int32_t complementaryFilter(float gyro[3], float accel[3], float mag[3],
|
|||||||
static void flightStatusUpdatedCb(UAVObjEvent *ev)
|
static void flightStatusUpdatedCb(UAVObjEvent *ev)
|
||||||
{
|
{
|
||||||
FlightStatusGet(&flightStatus);
|
FlightStatusGet(&flightStatus);
|
||||||
HomeLocationGet(&homeLocation);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user