1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

LP-173 Remove explicit calls to remaining settings objects: EKFConfiguration, HomeLocation, RevoCalibration and TakeOffLocation

This commit is contained in:
Vladimir Zidar 2017-10-17 13:39:22 +02:00
parent e1346f427e
commit 0b317f8208
14 changed files with 2 additions and 24 deletions

View File

@ -80,7 +80,6 @@ static float applyExpo(float value, float expo)
*/
void plan_initialize()
{
TakeOffLocationInitialize();
PositionStateInitialize();
PathDesiredInitialize();
FlightStatusInitialize();

View File

@ -99,7 +99,6 @@ int32_t CameraControlInitialize(void)
CameraControlActivityInitialize();
CameraDesiredInitialize();
CameraControlSettingsConnectCallback(SettingsUpdateCb);
HomeLocationInitialize();
HomeLocationConnectCallback(HomeLocationUpdateCb);
GPSTimeInitialize();
PositionStateInitialize();

View File

@ -218,7 +218,6 @@ int32_t GPSInitialize(void)
GPSVelocitySensorInitialize();
GPSTimeInitialize();
GPSSatellitesInitialize();
HomeLocationInitialize();
#if defined(ANY_FULL_MAG_PARSER)
AuxMagSensorInitialize();
GPSExtendedStatusInitialize();
@ -238,9 +237,6 @@ int32_t GPSInitialize(void)
#if !defined(PIOS_GPS_MINIMAL)
GPSTimeInitialize();
GPSSatellitesInitialize();
#endif
#if defined(PIOS_GPS_SETS_HOMELOCATION)
HomeLocationInitialize();
#endif
// updateHwSettings() uses gpsSettings
GPSSettingsGet(&gpsSettings);

View File

@ -40,10 +40,10 @@ static void SetTakeOffLocation();
void takeOffLocationHandlerInit()
{
TakeOffLocationInitialize();
// check whether there is a preset/valid takeoff location
TakeOffLocationModeOptions mode;
TakeOffLocationStatusOptions status;
TakeOffLocationModeGet(&mode);
TakeOffLocationStatusGet(&status);
// preset with invalid location will actually behave like FirstTakeoff

View File

@ -2426,9 +2426,6 @@ int32_t osdgenInitialize(void)
GPSTimeInitialize();
GPSSatellitesInitialize();
#endif
#ifdef PIOS_GPS_SETS_HOMELOCATION
HomeLocationInitialize();
#endif
#endif
BaroSensorInitialize();
FlightStatusInitialize();

View File

@ -165,7 +165,6 @@ extern "C" int32_t PathFollowerInitialize()
StabilizationDesiredInitialize();
AirspeedStateInitialize();
AttitudeStateInitialize();
TakeOffLocationInitialize();
PoiLocationInitialize();
ManualControlCommandInitialize();
StabilizationBankInitialize();
@ -176,7 +175,6 @@ extern "C" int32_t PathFollowerInitialize()
StatusVtolAutoTakeoffInitialize();
// VtolLandFSM additional objects
HomeLocationInitialize();
AccelStateInitialize();
// Init references to controllers

View File

@ -210,7 +210,6 @@ int32_t SensorsInitialize(void)
AccelSensorInitialize();
MagSensorInitialize();
BaroSensorInitialize();
RevoCalibrationInitialize();
#if defined(PIOS_INCLUDE_HMC5X83)
// for auxmagsupport.c helpers

View File

@ -115,7 +115,6 @@ int32_t SensorsInitialize(void)
GPSPositionSensorInitialize();
GPSVelocitySensorInitialize();
MagSensorInitialize();
RevoCalibrationInitialize();
return 0;
}

View File

@ -83,10 +83,9 @@ int32_t filterAltitudeInitialize(stateFilter *handle)
handle->init = &init;
handle->filter = &filter;
handle->localdata = pios_malloc(sizeof(struct data));
HomeLocationInitialize();
AttitudeStateInitialize();
AltitudeFilterSettingsConnectCallback(&settingsUpdatedCb);
reloadSettings = true;
reloadSettings = true;
return STACK_REQUIRED;
}

View File

@ -104,8 +104,6 @@ static void globalInit(void)
if (!initialized) {
initialized = 1;
FlightStatusInitialize();
HomeLocationInitialize();
RevoCalibrationInitialize();
FlightStatusConnectCallback(&flightStatusUpdatedCb);
flightStatusUpdatedCb(NULL);
}

View File

@ -93,9 +93,7 @@ static int32_t globalInit(stateFilter *handle, bool usePos, bool navOnly)
struct data *this = (struct data *)handle->localdata;
this->usePos = usePos;
this->navOnly = navOnly;
EKFConfigurationInitialize();
EKFStateVarianceInitialize();
HomeLocationInitialize();
return STACK_REQUIRED;
}

View File

@ -62,7 +62,6 @@ int32_t filterLLAInitialize(stateFilter *handle)
handle->filter = &filter;
handle->localdata = pios_malloc(sizeof(struct data));
GPSPositionSensorInitialize();
HomeLocationInitialize();
return STACK_REQUIRED;
}

View File

@ -72,7 +72,6 @@ int32_t filterMagInitialize(stateFilter *handle)
handle->init = &init;
handle->filter = &filter;
handle->localdata = pios_malloc(sizeof(struct data));
HomeLocationInitialize();
return STACK_REQUIRED;
}

View File

@ -334,8 +334,6 @@ int32_t StateEstimationInitialize(void)
GPSVelocitySensorInitialize();
GPSPositionSensorInitialize();
HomeLocationInitialize();
GyroStateInitialize();
AccelStateInitialize();
MagStateInitialize();