1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-30 15:52:12 +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() void plan_initialize()
{ {
TakeOffLocationInitialize();
PositionStateInitialize(); PositionStateInitialize();
PathDesiredInitialize(); PathDesiredInitialize();
FlightStatusInitialize(); FlightStatusInitialize();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -104,8 +104,6 @@ static void globalInit(void)
if (!initialized) { if (!initialized) {
initialized = 1; initialized = 1;
FlightStatusInitialize(); FlightStatusInitialize();
HomeLocationInitialize();
RevoCalibrationInitialize();
FlightStatusConnectCallback(&flightStatusUpdatedCb); FlightStatusConnectCallback(&flightStatusUpdatedCb);
flightStatusUpdatedCb(NULL); 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; struct data *this = (struct data *)handle->localdata;
this->usePos = usePos; this->usePos = usePos;
this->navOnly = navOnly; this->navOnly = navOnly;
EKFConfigurationInitialize();
EKFStateVarianceInitialize(); EKFStateVarianceInitialize();
HomeLocationInitialize();
return STACK_REQUIRED; return STACK_REQUIRED;
} }

View File

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

View File

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

View File

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