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:
parent
e1346f427e
commit
0b317f8208
@ -80,7 +80,6 @@ static float applyExpo(float value, float expo)
|
|||||||
*/
|
*/
|
||||||
void plan_initialize()
|
void plan_initialize()
|
||||||
{
|
{
|
||||||
TakeOffLocationInitialize();
|
|
||||||
PositionStateInitialize();
|
PositionStateInitialize();
|
||||||
PathDesiredInitialize();
|
PathDesiredInitialize();
|
||||||
FlightStatusInitialize();
|
FlightStatusInitialize();
|
||||||
|
@ -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();
|
||||||
|
@ -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);
|
||||||
|
@ -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
|
||||||
|
@ -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();
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -115,7 +115,6 @@ int32_t SensorsInitialize(void)
|
|||||||
GPSPositionSensorInitialize();
|
GPSPositionSensorInitialize();
|
||||||
GPSVelocitySensorInitialize();
|
GPSVelocitySensorInitialize();
|
||||||
MagSensorInitialize();
|
MagSensorInitialize();
|
||||||
RevoCalibrationInitialize();
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,6 @@ 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;
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -334,8 +334,6 @@ int32_t StateEstimationInitialize(void)
|
|||||||
GPSVelocitySensorInitialize();
|
GPSVelocitySensorInitialize();
|
||||||
GPSPositionSensorInitialize();
|
GPSPositionSensorInitialize();
|
||||||
|
|
||||||
HomeLocationInitialize();
|
|
||||||
|
|
||||||
GyroStateInitialize();
|
GyroStateInitialize();
|
||||||
AccelStateInitialize();
|
AccelStateInitialize();
|
||||||
MagStateInitialize();
|
MagStateInitialize();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user