mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
Merged in mindnever/librepilot/LP-173-Init_all_settings_objects_automatically (pull request #467)
LP-173 Initialize all settings objects automatically Approved-by: Vladimir Zidar <mr_w@mindnever.org> Approved-by: Philippe Renon <philippe_renon@yahoo.fr> Approved-by: Jan NIJS <dr.oblivium@gmail.com> Approved-by: Lalanne Laurent <f5soh@free.fr>
This commit is contained in:
commit
754eca955a
@ -80,15 +80,12 @@ static float applyExpo(float value, float expo)
|
|||||||
*/
|
*/
|
||||||
void plan_initialize()
|
void plan_initialize()
|
||||||
{
|
{
|
||||||
TakeOffLocationInitialize();
|
|
||||||
PositionStateInitialize();
|
PositionStateInitialize();
|
||||||
PathDesiredInitialize();
|
PathDesiredInitialize();
|
||||||
FlightModeSettingsInitialize();
|
|
||||||
FlightStatusInitialize();
|
FlightStatusInitialize();
|
||||||
AttitudeStateInitialize();
|
AttitudeStateInitialize();
|
||||||
ManualControlCommandInitialize();
|
ManualControlCommandInitialize();
|
||||||
VelocityStateInitialize();
|
VelocityStateInitialize();
|
||||||
VtolPathFollowerSettingsInitialize();
|
|
||||||
StabilizationBankInitialize();
|
StabilizationBankInitialize();
|
||||||
StabilizationDesiredInitialize();
|
StabilizationDesiredInitialize();
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,6 @@ int32_t configuration_check()
|
|||||||
|
|
||||||
// Classify navigation capability
|
// Classify navigation capability
|
||||||
#ifdef REVOLUTION
|
#ifdef REVOLUTION
|
||||||
RevoSettingsInitialize();
|
|
||||||
RevoSettingsFusionAlgorithmOptions revoFusion;
|
RevoSettingsFusionAlgorithmOptions revoFusion;
|
||||||
RevoSettingsFusionAlgorithmGet(&revoFusion);
|
RevoSettingsFusionAlgorithmGet(&revoFusion);
|
||||||
bool navCapableFusion;
|
bool navCapableFusion;
|
||||||
|
@ -147,11 +147,9 @@ int32_t ActuatorStart()
|
|||||||
int32_t ActuatorInitialize()
|
int32_t ActuatorInitialize()
|
||||||
{
|
{
|
||||||
// Register for notification of changes to ActuatorSettings
|
// Register for notification of changes to ActuatorSettings
|
||||||
ActuatorSettingsInitialize();
|
|
||||||
ActuatorSettingsConnectCallback(ActuatorSettingsUpdatedCb);
|
ActuatorSettingsConnectCallback(ActuatorSettingsUpdatedCb);
|
||||||
|
|
||||||
// Register for notification of changes to MixerSettings
|
// Register for notification of changes to MixerSettings
|
||||||
MixerSettingsInitialize();
|
|
||||||
MixerSettingsConnectCallback(MixerSettingsUpdatedCb);
|
MixerSettingsConnectCallback(MixerSettingsUpdatedCb);
|
||||||
|
|
||||||
// Listen for ActuatorDesired updates (Primary input to this module)
|
// Listen for ActuatorDesired updates (Primary input to this module)
|
||||||
@ -164,7 +162,6 @@ int32_t ActuatorInitialize()
|
|||||||
|
|
||||||
// Check if CameraStab module is enabled
|
// Check if CameraStab module is enabled
|
||||||
HwSettingsOptionalModulesData optionalModules;
|
HwSettingsOptionalModulesData optionalModules;
|
||||||
HwSettingsInitialize();
|
|
||||||
HwSettingsOptionalModulesGet(&optionalModules);
|
HwSettingsOptionalModulesGet(&optionalModules);
|
||||||
camStabEnabled = (optionalModules.CameraStab == HWSETTINGS_OPTIONALMODULES_ENABLED);
|
camStabEnabled = (optionalModules.CameraStab == HWSETTINGS_OPTIONALMODULES_ENABLED);
|
||||||
camControlEnabled = (optionalModules.CameraControl == HWSETTINGS_OPTIONALMODULES_ENABLED);
|
camControlEnabled = (optionalModules.CameraControl == HWSETTINGS_OPTIONALMODULES_ENABLED);
|
||||||
@ -177,10 +174,8 @@ int32_t ActuatorInitialize()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef PIOS_EXCLUDE_ADVANCED_FEATURES
|
#ifndef PIOS_EXCLUDE_ADVANCED_FEATURES
|
||||||
VtolPathFollowerSettingsInitialize();
|
|
||||||
VtolPathFollowerSettingsConnectCallback(&SettingsUpdatedCb);
|
VtolPathFollowerSettingsConnectCallback(&SettingsUpdatedCb);
|
||||||
#endif
|
#endif
|
||||||
SystemSettingsInitialize();
|
|
||||||
SystemSettingsConnectCallback(&SettingsUpdatedCb);
|
SystemSettingsConnectCallback(&SettingsUpdatedCb);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -97,7 +97,6 @@ int32_t AirspeedInitialize()
|
|||||||
airspeedEnabled = true;
|
airspeedEnabled = true;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
HwSettingsInitialize();
|
|
||||||
HwSettingsOptionalModulesOptions optionalModules[HWSETTINGS_OPTIONALMODULES_NUMELEM];
|
HwSettingsOptionalModulesOptions optionalModules[HWSETTINGS_OPTIONALMODULES_NUMELEM];
|
||||||
HwSettingsOptionalModulesArrayGet(optionalModules);
|
HwSettingsOptionalModulesArrayGet(optionalModules);
|
||||||
|
|
||||||
@ -121,7 +120,6 @@ int32_t AirspeedInitialize()
|
|||||||
}
|
}
|
||||||
|
|
||||||
AirspeedSensorInitialize();
|
AirspeedSensorInitialize();
|
||||||
AirspeedSettingsInitialize();
|
|
||||||
|
|
||||||
AirspeedSettingsConnectCallback(AirspeedSettingsUpdatedCb);
|
AirspeedSettingsConnectCallback(AirspeedSettingsUpdatedCb);
|
||||||
|
|
||||||
|
@ -103,7 +103,6 @@ int32_t AltitudeInitialize()
|
|||||||
#ifdef MODULE_ALTITUDE_BUILTIN
|
#ifdef MODULE_ALTITUDE_BUILTIN
|
||||||
altitudeEnabled = 1;
|
altitudeEnabled = 1;
|
||||||
#else
|
#else
|
||||||
HwSettingsInitialize();
|
|
||||||
uint8_t optionalModules[HWSETTINGS_OPTIONALMODULES_NUMELEM];
|
uint8_t optionalModules[HWSETTINGS_OPTIONALMODULES_NUMELEM];
|
||||||
HwSettingsOptionalModulesGet(optionalModules);
|
HwSettingsOptionalModulesGet(optionalModules);
|
||||||
if (optionalModules[HWSETTINGS_OPTIONALMODULES_ALTITUDE] == HWSETTINGS_OPTIONALMODULES_ENABLED) {
|
if (optionalModules[HWSETTINGS_OPTIONALMODULES_ALTITUDE] == HWSETTINGS_OPTIONALMODULES_ENABLED) {
|
||||||
|
@ -197,8 +197,6 @@ int32_t AttitudeStart(void)
|
|||||||
int32_t AttitudeInitialize(void)
|
int32_t AttitudeInitialize(void)
|
||||||
{
|
{
|
||||||
AttitudeStateInitialize();
|
AttitudeStateInitialize();
|
||||||
AttitudeSettingsInitialize();
|
|
||||||
AccelGyroSettingsInitialize();
|
|
||||||
AccelStateInitialize();
|
AccelStateInitialize();
|
||||||
GyroStateInitialize();
|
GyroStateInitialize();
|
||||||
|
|
||||||
|
@ -164,15 +164,9 @@ static void UpdateStabilizationDesired(bool doingIdent);
|
|||||||
*/
|
*/
|
||||||
int32_t AutoTuneInitialize(void)
|
int32_t AutoTuneInitialize(void)
|
||||||
{
|
{
|
||||||
// do this here since module can become disabled for several reasons
|
|
||||||
// even for MODULE_AutoTune_BUILTIN
|
|
||||||
FlightModeSettingsInitialize();
|
|
||||||
|
|
||||||
#if defined(MODULE_AutoTune_BUILTIN)
|
#if defined(MODULE_AutoTune_BUILTIN)
|
||||||
moduleEnabled = true;
|
moduleEnabled = true;
|
||||||
#else
|
#else
|
||||||
// HwSettings is only used right here, so init here
|
|
||||||
HwSettingsInitialize();
|
|
||||||
HwSettingsOptionalModulesData optionalModules;
|
HwSettingsOptionalModulesData optionalModules;
|
||||||
HwSettingsOptionalModulesGet(&optionalModules);
|
HwSettingsOptionalModulesGet(&optionalModules);
|
||||||
if (optionalModules.AutoTune == HWSETTINGS_OPTIONALMODULES_ENABLED) {
|
if (optionalModules.AutoTune == HWSETTINGS_OPTIONALMODULES_ENABLED) {
|
||||||
@ -195,10 +189,6 @@ int32_t AutoTuneInitialize(void)
|
|||||||
GyroStateInitialize();
|
GyroStateInitialize();
|
||||||
ManualControlCommandInitialize();
|
ManualControlCommandInitialize();
|
||||||
StabilizationBankInitialize();
|
StabilizationBankInitialize();
|
||||||
StabilizationSettingsBank1Initialize();
|
|
||||||
StabilizationSettingsBank2Initialize();
|
|
||||||
StabilizationSettingsBank3Initialize();
|
|
||||||
SystemIdentSettingsInitialize();
|
|
||||||
SystemIdentStateInitialize();
|
SystemIdentStateInitialize();
|
||||||
|
|
||||||
atQueue = xQueueCreate(AT_QUEUE_NUMELEM, sizeof(struct at_queued_data));
|
atQueue = xQueueCreate(AT_QUEUE_NUMELEM, sizeof(struct at_queued_data));
|
||||||
|
@ -95,7 +95,6 @@ int32_t BatteryInitialize(void)
|
|||||||
#ifdef MODULE_BATTERY_BUILTIN
|
#ifdef MODULE_BATTERY_BUILTIN
|
||||||
batteryEnabled = true;
|
batteryEnabled = true;
|
||||||
#else
|
#else
|
||||||
HwSettingsInitialize();
|
|
||||||
HwSettingsOptionalModulesData optionalModules;
|
HwSettingsOptionalModulesData optionalModules;
|
||||||
HwSettingsOptionalModulesGet(&optionalModules);
|
HwSettingsOptionalModulesGet(&optionalModules);
|
||||||
|
|
||||||
@ -127,7 +126,6 @@ int32_t BatteryInitialize(void)
|
|||||||
// Start module
|
// Start module
|
||||||
if (batteryEnabled) {
|
if (batteryEnabled) {
|
||||||
FlightBatteryStateInitialize();
|
FlightBatteryStateInitialize();
|
||||||
FlightBatterySettingsInitialize();
|
|
||||||
SystemStatsInitialize();
|
SystemStatsInitialize();
|
||||||
|
|
||||||
static UAVObjEvent ev;
|
static UAVObjEvent ev;
|
||||||
|
@ -90,7 +90,6 @@ static void FillActivityInfo();
|
|||||||
int32_t CameraControlInitialize(void)
|
int32_t CameraControlInitialize(void)
|
||||||
{
|
{
|
||||||
ccd = 0;
|
ccd = 0;
|
||||||
HwSettingsInitialize();
|
|
||||||
HwSettingsOptionalModulesData modules;
|
HwSettingsOptionalModulesData modules;
|
||||||
HwSettingsOptionalModulesGet(&modules);
|
HwSettingsOptionalModulesGet(&modules);
|
||||||
if (modules.CameraControl == HWSETTINGS_OPTIONALMODULES_ENABLED) {
|
if (modules.CameraControl == HWSETTINGS_OPTIONALMODULES_ENABLED) {
|
||||||
@ -99,9 +98,7 @@ int32_t CameraControlInitialize(void)
|
|||||||
ccd->callbackHandle = PIOS_CALLBACKSCHEDULER_Create(&CameraControlTask, CALLBACK_PRIORITY, CBTASK_PRIORITY, CALLBACKINFO_RUNNING_CAMERACONTROL, STACK_SIZE_BYTES);
|
ccd->callbackHandle = PIOS_CALLBACKSCHEDULER_Create(&CameraControlTask, CALLBACK_PRIORITY, CBTASK_PRIORITY, CALLBACKINFO_RUNNING_CAMERACONTROL, STACK_SIZE_BYTES);
|
||||||
CameraControlActivityInitialize();
|
CameraControlActivityInitialize();
|
||||||
CameraDesiredInitialize();
|
CameraDesiredInitialize();
|
||||||
CameraControlSettingsInitialize();
|
|
||||||
CameraControlSettingsConnectCallback(SettingsUpdateCb);
|
CameraControlSettingsConnectCallback(SettingsUpdateCb);
|
||||||
HomeLocationInitialize();
|
|
||||||
HomeLocationConnectCallback(HomeLocationUpdateCb);
|
HomeLocationConnectCallback(HomeLocationUpdateCb);
|
||||||
GPSTimeInitialize();
|
GPSTimeInitialize();
|
||||||
PositionStateInitialize();
|
PositionStateInitialize();
|
||||||
|
@ -97,7 +97,6 @@ int32_t CameraStabInitialize(void)
|
|||||||
#else
|
#else
|
||||||
HwSettingsOptionalModulesData optionalModules;
|
HwSettingsOptionalModulesData optionalModules;
|
||||||
|
|
||||||
HwSettingsInitialize();
|
|
||||||
HwSettingsOptionalModulesGet(&optionalModules);
|
HwSettingsOptionalModulesGet(&optionalModules);
|
||||||
|
|
||||||
if (optionalModules.CameraStab == HWSETTINGS_OPTIONALMODULES_ENABLED) {
|
if (optionalModules.CameraStab == HWSETTINGS_OPTIONALMODULES_ENABLED) {
|
||||||
@ -119,7 +118,6 @@ int32_t CameraStabInitialize(void)
|
|||||||
csd->lastSysTime = xTaskGetTickCount();
|
csd->lastSysTime = xTaskGetTickCount();
|
||||||
|
|
||||||
AttitudeStateInitialize();
|
AttitudeStateInitialize();
|
||||||
CameraStabSettingsInitialize();
|
|
||||||
CameraDesiredInitialize();
|
CameraDesiredInitialize();
|
||||||
|
|
||||||
UAVObjEvent ev = {
|
UAVObjEvent ev = {
|
||||||
|
@ -98,7 +98,6 @@ int32_t MagBaroInitialize()
|
|||||||
#ifdef MODULE_MAGBARO_BUILTIN
|
#ifdef MODULE_MAGBARO_BUILTIN
|
||||||
magbaroEnabled = 1;
|
magbaroEnabled = 1;
|
||||||
#else
|
#else
|
||||||
HwSettingsInitialize();
|
|
||||||
uint8_t optionalModules[HWSETTINGS_OPTIONALMODULES_NUMELEM];
|
uint8_t optionalModules[HWSETTINGS_OPTIONALMODULES_NUMELEM];
|
||||||
HwSettingsOptionalModulesGet(optionalModules);
|
HwSettingsOptionalModulesGet(optionalModules);
|
||||||
if (optionalModules[HWSETTINGS_OPTIONALMODULES_MAGBARO] == HWSETTINGS_OPTIONALMODULES_ENABLED) {
|
if (optionalModules[HWSETTINGS_OPTIONALMODULES_MAGBARO] == HWSETTINGS_OPTIONALMODULES_ENABLED) {
|
||||||
|
@ -43,7 +43,6 @@ static int32_t fault_initialize(void)
|
|||||||
#ifdef MODULE_FAULT_BUILTIN
|
#ifdef MODULE_FAULT_BUILTIN
|
||||||
module_enabled = true;
|
module_enabled = true;
|
||||||
#else
|
#else
|
||||||
HwSettingsInitialize();
|
|
||||||
uint8_t optionalModules[HWSETTINGS_OPTIONALMODULES_NUMELEM];
|
uint8_t optionalModules[HWSETTINGS_OPTIONALMODULES_NUMELEM];
|
||||||
|
|
||||||
HwSettingsOptionalModulesGet(optionalModules);
|
HwSettingsOptionalModulesGet(optionalModules);
|
||||||
@ -61,7 +60,6 @@ static int32_t fault_initialize(void)
|
|||||||
* we've booted in BootFault recovery mode with all optional
|
* we've booted in BootFault recovery mode with all optional
|
||||||
* modules disabled.
|
* modules disabled.
|
||||||
*/
|
*/
|
||||||
FaultSettingsInitialize();
|
|
||||||
|
|
||||||
if (module_enabled) {
|
if (module_enabled) {
|
||||||
FaultSettingsActivateFaultGet(&active_fault);
|
FaultSettingsActivateFaultGet(&active_fault);
|
||||||
|
@ -79,7 +79,6 @@ int32_t FlightPlanInitialize()
|
|||||||
|
|
||||||
FlightPlanStatusInitialize();
|
FlightPlanStatusInitialize();
|
||||||
FlightPlanControlInitialize();
|
FlightPlanControlInitialize();
|
||||||
FlightPlanSettingsInitialize();
|
|
||||||
|
|
||||||
// Listen for object updates
|
// Listen for object updates
|
||||||
FlightPlanControlConnectCallback(&objectUpdatedCb);
|
FlightPlanControlConnectCallback(&objectUpdatedCb);
|
||||||
|
@ -196,7 +196,6 @@ int32_t GPSStart(void)
|
|||||||
|
|
||||||
int32_t GPSInitialize(void)
|
int32_t GPSInitialize(void)
|
||||||
{
|
{
|
||||||
HwSettingsInitialize();
|
|
||||||
#ifdef MODULE_GPS_BUILTIN
|
#ifdef MODULE_GPS_BUILTIN
|
||||||
gpsEnabled = true;
|
gpsEnabled = true;
|
||||||
#else
|
#else
|
||||||
@ -219,17 +218,14 @@ 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();
|
||||||
AuxMagSettingsInitialize();
|
|
||||||
GPSExtendedStatusInitialize();
|
GPSExtendedStatusInitialize();
|
||||||
|
|
||||||
// Initialize mag parameters
|
// Initialize mag parameters
|
||||||
AuxMagSettingsUpdatedCb(NULL);
|
AuxMagSettingsUpdatedCb(NULL);
|
||||||
AuxMagSettingsConnectCallback(AuxMagSettingsUpdatedCb);
|
AuxMagSettingsConnectCallback(AuxMagSettingsUpdatedCb);
|
||||||
#endif
|
#endif
|
||||||
GPSSettingsInitialize();
|
|
||||||
// updateHwSettings() uses gpsSettings
|
// updateHwSettings() uses gpsSettings
|
||||||
GPSSettingsGet(&gpsSettings);
|
GPSSettingsGet(&gpsSettings);
|
||||||
// must updateHwSettings() before updateGpsSettings() so baud rate is set before GPS serial code starts running
|
// must updateHwSettings() before updateGpsSettings() so baud rate is set before GPS serial code starts running
|
||||||
@ -242,10 +238,6 @@ int32_t GPSInitialize(void)
|
|||||||
GPSTimeInitialize();
|
GPSTimeInitialize();
|
||||||
GPSSatellitesInitialize();
|
GPSSatellitesInitialize();
|
||||||
#endif
|
#endif
|
||||||
#if defined(PIOS_GPS_SETS_HOMELOCATION)
|
|
||||||
HomeLocationInitialize();
|
|
||||||
#endif
|
|
||||||
GPSSettingsInitialize();
|
|
||||||
// updateHwSettings() uses gpsSettings
|
// updateHwSettings() uses gpsSettings
|
||||||
GPSSettingsGet(&gpsSettings);
|
GPSSettingsGet(&gpsSettings);
|
||||||
// must updateHwSettings() before updateGpsSettings() so baud rate is set before GPS serial code starts running
|
// must updateHwSettings() before updateGpsSettings() so baud rate is set before GPS serial code starts running
|
||||||
|
@ -52,7 +52,6 @@ static void FlightStatusUpdatedCb(UAVObjEvent *ev);
|
|||||||
|
|
||||||
int32_t LoggingInitialize(void)
|
int32_t LoggingInitialize(void)
|
||||||
{
|
{
|
||||||
DebugLogSettingsInitialize();
|
|
||||||
DebugLogControlInitialize();
|
DebugLogControlInitialize();
|
||||||
DebugLogStatusInitialize();
|
DebugLogStatusInitialize();
|
||||||
DebugLogEntryInitialize();
|
DebugLogEntryInitialize();
|
||||||
|
@ -167,15 +167,10 @@ int32_t ManualControlInitialize()
|
|||||||
|
|
||||||
ManualControlCommandInitialize();
|
ManualControlCommandInitialize();
|
||||||
FlightStatusInitialize();
|
FlightStatusInitialize();
|
||||||
ManualControlSettingsInitialize();
|
|
||||||
FlightModeSettingsInitialize();
|
|
||||||
SystemSettingsInitialize();
|
|
||||||
StabilizationSettingsInitialize();
|
|
||||||
AccessoryDesiredInitialize();
|
AccessoryDesiredInitialize();
|
||||||
#ifndef PIOS_EXCLUDE_ADVANCED_FEATURES
|
#ifndef PIOS_EXCLUDE_ADVANCED_FEATURES
|
||||||
SystemAlarmsInitialize();
|
SystemAlarmsInitialize();
|
||||||
VtolSelfTuningStatsInitialize();
|
VtolSelfTuningStatsInitialize();
|
||||||
VtolPathFollowerSettingsInitialize();
|
|
||||||
VtolPathFollowerSettingsConnectCallback(&SettingsUpdatedCb);
|
VtolPathFollowerSettingsConnectCallback(&SettingsUpdatedCb);
|
||||||
SystemSettingsConnectCallback(&SettingsUpdatedCb);
|
SystemSettingsConnectCallback(&SettingsUpdatedCb);
|
||||||
#endif /* ifndef PIOS_EXCLUDE_ADVANCED_FEATURES */
|
#endif /* ifndef PIOS_EXCLUDE_ADVANCED_FEATURES */
|
||||||
|
@ -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,11 +2426,7 @@ int32_t osdgenInitialize(void)
|
|||||||
GPSTimeInitialize();
|
GPSTimeInitialize();
|
||||||
GPSSatellitesInitialize();
|
GPSSatellitesInitialize();
|
||||||
#endif
|
#endif
|
||||||
#ifdef PIOS_GPS_SETS_HOMELOCATION
|
|
||||||
HomeLocationInitialize();
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
OsdSettingsInitialize();
|
|
||||||
BaroSensorInitialize();
|
BaroSensorInitialize();
|
||||||
FlightStatusInitialize();
|
FlightStatusInitialize();
|
||||||
|
|
||||||
|
@ -277,7 +277,6 @@ static int32_t osdoutputInitialize(void)
|
|||||||
#ifdef MODULE_OSDOUTPUT_BUILTIN
|
#ifdef MODULE_OSDOUTPUT_BUILTIN
|
||||||
osdoutputEnabled = 1;
|
osdoutputEnabled = 1;
|
||||||
#else
|
#else
|
||||||
HwSettingsInitialize();
|
|
||||||
HwSettingsOptionalModulesData optionalModules;
|
HwSettingsOptionalModulesData optionalModules;
|
||||||
HwSettingsOptionalModulesGet(&optionalModules);
|
HwSettingsOptionalModulesGet(&optionalModules);
|
||||||
if (optionalModules.OsdHk == HWSETTINGS_OPTIONALMODULES_ENABLED) {
|
if (optionalModules.OsdHk == HWSETTINGS_OPTIONALMODULES_ENABLED) {
|
||||||
|
@ -81,7 +81,6 @@ int32_t OveroSyncInitialize(void)
|
|||||||
overoEnabled = true;
|
overoEnabled = true;
|
||||||
#else
|
#else
|
||||||
|
|
||||||
HwSettingsInitialize();
|
|
||||||
uint8_t optionalModules[HWSETTINGS_OPTIONALMODULES_NUMELEM];
|
uint8_t optionalModules[HWSETTINGS_OPTIONALMODULES_NUMELEM];
|
||||||
HwSettingsOptionalModulesGet(optionalModules);
|
HwSettingsOptionalModulesGet(optionalModules);
|
||||||
|
|
||||||
|
@ -154,12 +154,8 @@ extern "C" int32_t PathFollowerStart()
|
|||||||
extern "C" int32_t PathFollowerInitialize()
|
extern "C" int32_t PathFollowerInitialize()
|
||||||
{
|
{
|
||||||
// initialize objects
|
// initialize objects
|
||||||
GroundPathFollowerSettingsInitialize();
|
|
||||||
FixedWingPathFollowerSettingsInitialize();
|
|
||||||
FixedWingPathFollowerStatusInitialize();
|
FixedWingPathFollowerStatusInitialize();
|
||||||
VtolPathFollowerSettingsInitialize();
|
|
||||||
FlightStatusInitialize();
|
FlightStatusInitialize();
|
||||||
FlightModeSettingsInitialize();
|
|
||||||
PathStatusInitialize();
|
PathStatusInitialize();
|
||||||
PathSummaryInitialize();
|
PathSummaryInitialize();
|
||||||
PathDesiredInitialize();
|
PathDesiredInitialize();
|
||||||
@ -169,10 +165,8 @@ extern "C" int32_t PathFollowerInitialize()
|
|||||||
StabilizationDesiredInitialize();
|
StabilizationDesiredInitialize();
|
||||||
AirspeedStateInitialize();
|
AirspeedStateInitialize();
|
||||||
AttitudeStateInitialize();
|
AttitudeStateInitialize();
|
||||||
TakeOffLocationInitialize();
|
|
||||||
PoiLocationInitialize();
|
PoiLocationInitialize();
|
||||||
ManualControlCommandInitialize();
|
ManualControlCommandInitialize();
|
||||||
SystemSettingsInitialize();
|
|
||||||
StabilizationBankInitialize();
|
StabilizationBankInitialize();
|
||||||
VtolSelfTuningStatsInitialize();
|
VtolSelfTuningStatsInitialize();
|
||||||
PIDStatusInitialize();
|
PIDStatusInitialize();
|
||||||
@ -181,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
|
||||||
|
@ -151,13 +151,9 @@ int32_t ReceiverInitialize()
|
|||||||
ManualControlCommandInitialize();
|
ManualControlCommandInitialize();
|
||||||
ReceiverActivityInitialize();
|
ReceiverActivityInitialize();
|
||||||
ReceiverStatusInitialize();
|
ReceiverStatusInitialize();
|
||||||
ManualControlSettingsInitialize();
|
|
||||||
#ifndef PIOS_EXCLUDE_ADVANCED_FEATURES
|
#ifndef PIOS_EXCLUDE_ADVANCED_FEATURES
|
||||||
StabilizationSettingsInitialize();
|
|
||||||
VtolPathFollowerSettingsInitialize();
|
|
||||||
VtolPathFollowerSettingsConnectCallback(&SettingsUpdatedCb);
|
VtolPathFollowerSettingsConnectCallback(&SettingsUpdatedCb);
|
||||||
#endif
|
#endif
|
||||||
SystemSettingsInitialize();
|
|
||||||
SystemSettingsConnectCallback(&SettingsUpdatedCb);
|
SystemSettingsConnectCallback(&SettingsUpdatedCb);
|
||||||
|
|
||||||
|
|
||||||
|
@ -210,14 +210,9 @@ int32_t SensorsInitialize(void)
|
|||||||
AccelSensorInitialize();
|
AccelSensorInitialize();
|
||||||
MagSensorInitialize();
|
MagSensorInitialize();
|
||||||
BaroSensorInitialize();
|
BaroSensorInitialize();
|
||||||
RevoCalibrationInitialize();
|
|
||||||
RevoSettingsInitialize();
|
|
||||||
AttitudeSettingsInitialize();
|
|
||||||
AccelGyroSettingsInitialize();
|
|
||||||
|
|
||||||
#if defined(PIOS_INCLUDE_HMC5X83)
|
#if defined(PIOS_INCLUDE_HMC5X83)
|
||||||
// for auxmagsupport.c helpers
|
// for auxmagsupport.c helpers
|
||||||
AuxMagSettingsInitialize();
|
|
||||||
AuxMagSensorInitialize();
|
AuxMagSensorInitialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -115,7 +115,6 @@ int32_t SensorsInitialize(void)
|
|||||||
GPSPositionSensorInitialize();
|
GPSPositionSensorInitialize();
|
||||||
GPSVelocitySensorInitialize();
|
GPSVelocitySensorInitialize();
|
||||||
MagSensorInitialize();
|
MagSensorInitialize();
|
||||||
RevoCalibrationInitialize();
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -191,7 +191,6 @@ static void VelocityStateUpdatedCb(__attribute__((unused)) UAVObjEvent *ev)
|
|||||||
*/
|
*/
|
||||||
void stabilizationAltitudeloopInit()
|
void stabilizationAltitudeloopInit()
|
||||||
{
|
{
|
||||||
AltitudeHoldSettingsInitialize();
|
|
||||||
AltitudeHoldStatusInitialize();
|
AltitudeHoldStatusInitialize();
|
||||||
PositionStateInitialize();
|
PositionStateInitialize();
|
||||||
VelocityStateInitialize();
|
VelocityStateInitialize();
|
||||||
|
@ -95,12 +95,8 @@ int32_t StabilizationInitialize()
|
|||||||
{
|
{
|
||||||
// Initialize variables
|
// Initialize variables
|
||||||
StabilizationDesiredInitialize();
|
StabilizationDesiredInitialize();
|
||||||
StabilizationSettingsInitialize();
|
|
||||||
StabilizationStatusInitialize();
|
StabilizationStatusInitialize();
|
||||||
StabilizationBankInitialize();
|
StabilizationBankInitialize();
|
||||||
StabilizationSettingsBank1Initialize();
|
|
||||||
StabilizationSettingsBank2Initialize();
|
|
||||||
StabilizationSettingsBank3Initialize();
|
|
||||||
RateDesiredInitialize();
|
RateDesiredInitialize();
|
||||||
ManualControlCommandInitialize(); // only used for PID bank selection based on flight mode switch
|
ManualControlCommandInitialize(); // only used for PID bank selection based on flight mode switch
|
||||||
sin_lookup_initalize();
|
sin_lookup_initalize();
|
||||||
|
@ -83,11 +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();
|
||||||
AltitudeFilterSettingsInitialize();
|
|
||||||
AltitudeFilterSettingsConnectCallback(&settingsUpdatedCb);
|
AltitudeFilterSettingsConnectCallback(&settingsUpdatedCb);
|
||||||
reloadSettings = true;
|
reloadSettings = true;
|
||||||
return STACK_REQUIRED;
|
return STACK_REQUIRED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +99,6 @@ static int32_t maininit(stateFilter *self)
|
|||||||
this->gpsAlt = 0.0f;
|
this->gpsAlt = 0.0f;
|
||||||
this->first_run = INIT_CYCLES;
|
this->first_run = INIT_CYCLES;
|
||||||
|
|
||||||
RevoSettingsInitialize();
|
|
||||||
RevoSettingsBaroGPSOffsetCorrectionAlphaGet(&this->baroGPSOffsetCorrectionAlpha);
|
RevoSettingsBaroGPSOffsetCorrectionAlphaGet(&this->baroGPSOffsetCorrectionAlpha);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,9 +61,7 @@ int32_t filterLLAInitialize(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));
|
||||||
GPSSettingsInitialize();
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,7 +83,6 @@ static int32_t init(stateFilter *self)
|
|||||||
this->oldPos[2] = 0.0f;
|
this->oldPos[2] = 0.0f;
|
||||||
this->inited = 0;
|
this->inited = 0;
|
||||||
|
|
||||||
RevoSettingsInitialize();
|
|
||||||
RevoSettingsVelocityPostProcessingLowPassAlphaGet(&this->alpha);
|
RevoSettingsVelocityPostProcessingLowPassAlphaGet(&this->alpha);
|
||||||
|
|
||||||
PIOS_DELTATIME_Init(&this->dtconfig, DT_INIT, DT_MIN, DT_MAX, DT_ALPHA);
|
PIOS_DELTATIME_Init(&this->dtconfig, DT_INIT, DT_MIN, DT_MAX, DT_ALPHA);
|
||||||
|
@ -326,8 +326,6 @@ static inline int32_t maxint32_t(int32_t a, int32_t b)
|
|||||||
*/
|
*/
|
||||||
int32_t StateEstimationInitialize(void)
|
int32_t StateEstimationInitialize(void)
|
||||||
{
|
{
|
||||||
RevoSettingsInitialize();
|
|
||||||
|
|
||||||
GyroSensorInitialize();
|
GyroSensorInitialize();
|
||||||
MagSensorInitialize();
|
MagSensorInitialize();
|
||||||
AuxMagSensorInitialize();
|
AuxMagSensorInitialize();
|
||||||
@ -336,15 +334,12 @@ int32_t StateEstimationInitialize(void)
|
|||||||
GPSVelocitySensorInitialize();
|
GPSVelocitySensorInitialize();
|
||||||
GPSPositionSensorInitialize();
|
GPSPositionSensorInitialize();
|
||||||
|
|
||||||
HomeLocationInitialize();
|
|
||||||
|
|
||||||
GyroStateInitialize();
|
GyroStateInitialize();
|
||||||
AccelStateInitialize();
|
AccelStateInitialize();
|
||||||
MagStateInitialize();
|
MagStateInitialize();
|
||||||
AirspeedStateInitialize();
|
AirspeedStateInitialize();
|
||||||
PositionStateInitialize();
|
PositionStateInitialize();
|
||||||
VelocityStateInitialize();
|
VelocityStateInitialize();
|
||||||
AuxMagSettingsInitialize();
|
|
||||||
|
|
||||||
RevoSettingsConnectCallback(&settingsUpdatedCb);
|
RevoSettingsConnectCallback(&settingsUpdatedCb);
|
||||||
|
|
||||||
|
@ -159,7 +159,6 @@ int32_t SystemModStart(void)
|
|||||||
int32_t SystemModInitialize(void)
|
int32_t SystemModInitialize(void)
|
||||||
{
|
{
|
||||||
// Must registers objects here for system thread because ObjectManager started in OpenPilotInit
|
// Must registers objects here for system thread because ObjectManager started in OpenPilotInit
|
||||||
SystemSettingsInitialize();
|
|
||||||
SystemStatsInitialize();
|
SystemStatsInitialize();
|
||||||
FlightStatusInitialize();
|
FlightStatusInitialize();
|
||||||
ObjectPersistenceInitialize();
|
ObjectPersistenceInitialize();
|
||||||
|
@ -267,10 +267,7 @@ void TelemetryInitializeChannel(channelContext *channel)
|
|||||||
*/
|
*/
|
||||||
int32_t TelemetryInitialize(void)
|
int32_t TelemetryInitialize(void)
|
||||||
{
|
{
|
||||||
HwSettingsInitialize();
|
|
||||||
|
|
||||||
#ifdef PIOS_INCLUDE_RFM22B
|
#ifdef PIOS_INCLUDE_RFM22B
|
||||||
OPLinkSettingsInitialize();
|
|
||||||
OPLinkSettingsData data;
|
OPLinkSettingsData data;
|
||||||
|
|
||||||
OPLinkSettingsGet(&data);
|
OPLinkSettingsGet(&data);
|
||||||
|
@ -102,11 +102,6 @@ int32_t TxPIDInitialize(void)
|
|||||||
bool txPIDEnabled;
|
bool txPIDEnabled;
|
||||||
HwSettingsOptionalModulesData optionalModules;
|
HwSettingsOptionalModulesData optionalModules;
|
||||||
|
|
||||||
#ifdef REVOLUTION
|
|
||||||
AltitudeHoldSettingsInitialize();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
HwSettingsInitialize();
|
|
||||||
HwSettingsOptionalModulesGet(&optionalModules);
|
HwSettingsOptionalModulesGet(&optionalModules);
|
||||||
|
|
||||||
if (optionalModules.TxPID == HWSETTINGS_OPTIONALMODULES_ENABLED) {
|
if (optionalModules.TxPID == HWSETTINGS_OPTIONALMODULES_ENABLED) {
|
||||||
@ -116,7 +111,6 @@ int32_t TxPIDInitialize(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (txPIDEnabled) {
|
if (txPIDEnabled) {
|
||||||
TxPIDSettingsInitialize();
|
|
||||||
TxPIDStatusInitialize();
|
TxPIDStatusInitialize();
|
||||||
AccessoryDesiredInitialize();
|
AccessoryDesiredInitialize();
|
||||||
|
|
||||||
@ -136,14 +130,12 @@ int32_t TxPIDInitialize(void)
|
|||||||
// StabilizationSettings update rate permanently. Use Metadata via
|
// StabilizationSettings update rate permanently. Use Metadata via
|
||||||
// browser to reset to defaults (telemetryAcked=true, OnChange).
|
// browser to reset to defaults (telemetryAcked=true, OnChange).
|
||||||
UAVObjMetadata metadata;
|
UAVObjMetadata metadata;
|
||||||
StabilizationSettingsInitialize();
|
|
||||||
StabilizationSettingsGetMetadata(&metadata);
|
StabilizationSettingsGetMetadata(&metadata);
|
||||||
metadata.telemetryAcked = 0;
|
metadata.telemetryAcked = 0;
|
||||||
metadata.telemetryUpdateMode = UPDATEMODE_PERIODIC;
|
metadata.telemetryUpdateMode = UPDATEMODE_PERIODIC;
|
||||||
metadata.telemetryUpdatePeriod = TELEMETRY_UPDATE_PERIOD_MS;
|
metadata.telemetryUpdatePeriod = TELEMETRY_UPDATE_PERIOD_MS;
|
||||||
StabilizationSettingsSetMetadata(&metadata);
|
StabilizationSettingsSetMetadata(&metadata);
|
||||||
|
|
||||||
AttitudeSettingsInitialize();
|
|
||||||
AttitudeSettingsGetMetadata(&metadata);
|
AttitudeSettingsGetMetadata(&metadata);
|
||||||
metadata.telemetryAcked = 0;
|
metadata.telemetryAcked = 0;
|
||||||
metadata.telemetryUpdateMode = UPDATEMODE_PERIODIC;
|
metadata.telemetryUpdateMode = UPDATEMODE_PERIODIC;
|
||||||
|
@ -125,7 +125,6 @@ static int32_t uavoHoTTBridgeInitialize(void)
|
|||||||
PIOS_COM_ChangeBaud(PIOS_COM_HOTT, 19200);
|
PIOS_COM_ChangeBaud(PIOS_COM_HOTT, 19200);
|
||||||
bool param = true;
|
bool param = true;
|
||||||
PIOS_COM_Ioctl(PIOS_COM_HOTT, PIOS_IOCTL_USART_SET_HALFDUPLEX, ¶m);
|
PIOS_COM_Ioctl(PIOS_COM_HOTT, PIOS_IOCTL_USART_SET_HALFDUPLEX, ¶m);
|
||||||
HoTTBridgeSettingsInitialize();
|
|
||||||
HoTTBridgeStatusInitialize();
|
HoTTBridgeStatusInitialize();
|
||||||
|
|
||||||
// allocate memory for telemetry data
|
// allocate memory for telemetry data
|
||||||
|
@ -565,7 +565,6 @@ void PIOS_BOARD_IO_Configure_OPLink_RCVR()
|
|||||||
void PIOS_BOARD_IO_Configure_RFM22B()
|
void PIOS_BOARD_IO_Configure_RFM22B()
|
||||||
{
|
{
|
||||||
#if defined(PIOS_INCLUDE_RFM22B)
|
#if defined(PIOS_INCLUDE_RFM22B)
|
||||||
OPLinkSettingsInitialize();
|
|
||||||
OPLinkStatusInitialize();
|
OPLinkStatusInitialize();
|
||||||
#endif /* PIOS_INCLUDE_RFM22B */
|
#endif /* PIOS_INCLUDE_RFM22B */
|
||||||
#if defined(PIOS_INCLUDE_OPLINKRCVR) && defined(PIOS_INCLUDE_RCVR)
|
#if defined(PIOS_INCLUDE_OPLINKRCVR) && defined(PIOS_INCLUDE_RCVR)
|
||||||
|
@ -147,7 +147,6 @@ void PIOS_BOARD_Sensors_Configure()
|
|||||||
# endif /* PIOS_INCLUDE_HMC5X83_INTERNAL */
|
# endif /* PIOS_INCLUDE_HMC5X83_INTERNAL */
|
||||||
|
|
||||||
# ifdef PIOS_INCLUDE_HMC5X83
|
# ifdef PIOS_INCLUDE_HMC5X83
|
||||||
AuxMagSettingsInitialize();
|
|
||||||
|
|
||||||
AuxMagSettingsTypeOptions option;
|
AuxMagSettingsTypeOptions option;
|
||||||
AuxMagSettingsTypeGet(&option);
|
AuxMagSettingsTypeGet(&option);
|
||||||
|
@ -1156,7 +1156,6 @@ int32_t PIOS_OpenLRS_Init(uint32_t *openlrs_id, uint32_t spi_id,
|
|||||||
openlrs_dev->ppm_callback = 0;
|
openlrs_dev->ppm_callback = 0;
|
||||||
|
|
||||||
|
|
||||||
OPLinkSettingsInitialize();
|
|
||||||
OPLinkStatusInitialize();
|
OPLinkStatusInitialize();
|
||||||
DEBUG_PRINTF(2, "OpenLRS UAVOs Initialized\r\n");
|
DEBUG_PRINTF(2, "OpenLRS UAVOs Initialized\r\n");
|
||||||
OPLinkSettingsData binding;
|
OPLinkSettingsData binding;
|
||||||
|
@ -52,6 +52,10 @@ typedef struct {
|
|||||||
/* Init module section */
|
/* Init module section */
|
||||||
extern initmodule_t __module_initcall_start[], __module_initcall_end[];
|
extern initmodule_t __module_initcall_start[], __module_initcall_end[];
|
||||||
extern volatile int initTaskDone;
|
extern volatile int initTaskDone;
|
||||||
|
|
||||||
|
/* Init settings section */
|
||||||
|
extern initcall_t __settings_initcall_start[], __settings_initcall_end[];
|
||||||
|
|
||||||
#ifdef USE_SIM_POSIX
|
#ifdef USE_SIM_POSIX
|
||||||
|
|
||||||
extern void InitModules();
|
extern void InitModules();
|
||||||
@ -60,6 +64,8 @@ extern int32_t SystemModInitialize(void);
|
|||||||
|
|
||||||
#define MODULE_INITCALL(ifn, sfn)
|
#define MODULE_INITCALL(ifn, sfn)
|
||||||
|
|
||||||
|
#define SETTINGS_INITCALL(fn)
|
||||||
|
|
||||||
#define MODULE_TASKCREATE_ALL \
|
#define MODULE_TASKCREATE_ALL \
|
||||||
{ \
|
{ \
|
||||||
/* Start all module threads */ \
|
/* Start all module threads */ \
|
||||||
@ -92,8 +98,15 @@ extern int32_t SystemModInitialize(void);
|
|||||||
static initmodule_t __initcall_##ifn __attribute__((__used__)) \
|
static initmodule_t __initcall_##ifn __attribute__((__used__)) \
|
||||||
__attribute__((__section__(".initcall" level ".init"))) = { .fn_minit = ifn, .fn_tinit = sfn }
|
__attribute__((__section__(".initcall" level ".init"))) = { .fn_minit = ifn, .fn_tinit = sfn }
|
||||||
|
|
||||||
|
#define __define_settings_initcall(level, fn) \
|
||||||
|
static initcall_t __initcall_##fn __attribute__((__used__)) \
|
||||||
|
__attribute__((__section__(".initcall" level ".init"))) = fn
|
||||||
|
|
||||||
|
|
||||||
#define MODULE_INITCALL(ifn, sfn) __define_module_initcall("module", ifn, sfn)
|
#define MODULE_INITCALL(ifn, sfn) __define_module_initcall("module", ifn, sfn)
|
||||||
|
|
||||||
|
#define SETTINGS_INITCALL(fn) __define_settings_initcall("settings", fn)
|
||||||
|
|
||||||
#define MODULE_INITIALISE_ALL \
|
#define MODULE_INITIALISE_ALL \
|
||||||
{ for (initmodule_t *fn = __module_initcall_start; fn < __module_initcall_end; fn++) { \
|
{ for (initmodule_t *fn = __module_initcall_start; fn < __module_initcall_end; fn++) { \
|
||||||
if (fn->fn_minit) { \
|
if (fn->fn_minit) { \
|
||||||
@ -111,6 +124,14 @@ extern int32_t SystemModInitialize(void);
|
|||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define SETTINGS_INITIALISE_ALL \
|
||||||
|
{ for (const initcall_t *fn = __settings_initcall_start; fn < __settings_initcall_end; fn++) { \
|
||||||
|
if (*fn) { \
|
||||||
|
(*fn)(); \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* USE_SIM_POSIX */
|
#endif /* USE_SIM_POSIX */
|
||||||
|
|
||||||
#endif /* PIOS_INITCALL_H */
|
#endif /* PIOS_INITCALL_H */
|
||||||
|
@ -61,8 +61,8 @@
|
|||||||
*/
|
*/
|
||||||
int32_t PIOS_MPU6000_CONFIG_Configure()
|
int32_t PIOS_MPU6000_CONFIG_Configure()
|
||||||
{
|
{
|
||||||
MPUGyroAccelSettingsInitialize();
|
|
||||||
MPUGyroAccelSettingsData mpuSettings;
|
MPUGyroAccelSettingsData mpuSettings;
|
||||||
|
|
||||||
MPUGyroAccelSettingsGet(&mpuSettings);
|
MPUGyroAccelSettingsGet(&mpuSettings);
|
||||||
return PIOS_MPU6000_ConfigureRanges(
|
return PIOS_MPU6000_ConfigureRanges(
|
||||||
PIOS_MPU6000_CONFIG_MAP_GYROSCALE(mpuSettings.GyroScale),
|
PIOS_MPU6000_CONFIG_MAP_GYROSCALE(mpuSettings.GyroScale),
|
||||||
|
@ -61,8 +61,8 @@
|
|||||||
*/
|
*/
|
||||||
int32_t PIOS_MPU9250_CONFIG_Configure()
|
int32_t PIOS_MPU9250_CONFIG_Configure()
|
||||||
{
|
{
|
||||||
MPUGyroAccelSettingsInitialize();
|
|
||||||
MPUGyroAccelSettingsData mpuSettings;
|
MPUGyroAccelSettingsData mpuSettings;
|
||||||
|
|
||||||
MPUGyroAccelSettingsGet(&mpuSettings);
|
MPUGyroAccelSettingsGet(&mpuSettings);
|
||||||
return PIOS_MPU9250_ConfigureRanges(
|
return PIOS_MPU9250_ConfigureRanges(
|
||||||
PIOS_MPU9250_CONFIG_MAP_GYROSCALE(mpuSettings.GyroScale),
|
PIOS_MPU9250_CONFIG_MAP_GYROSCALE(mpuSettings.GyroScale),
|
||||||
|
@ -37,6 +37,16 @@ SECTIONS
|
|||||||
__module_initcall_end = .;
|
__module_initcall_end = .;
|
||||||
} >FLASH
|
} >FLASH
|
||||||
|
|
||||||
|
/* settings init sections */
|
||||||
|
.initcallsettings.init :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__settings_initcall_start = .;
|
||||||
|
KEEP(*(.initcallsettings.init))
|
||||||
|
. = ALIGN(4);
|
||||||
|
__settings_initcall_end = .;
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
.ARM.extab :
|
.ARM.extab :
|
||||||
{
|
{
|
||||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
|
@ -32,6 +32,16 @@ SECTIONS
|
|||||||
__module_initcall_end = .;
|
__module_initcall_end = .;
|
||||||
} >FLASH
|
} >FLASH
|
||||||
|
|
||||||
|
/* settings init sections */
|
||||||
|
.initcallsettings.init :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__settings_initcall_start = .;
|
||||||
|
KEEP(*(.initcallsettings.init))
|
||||||
|
. = ALIGN(4);
|
||||||
|
__settings_initcall_end = .;
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
.ARM.extab :
|
.ARM.extab :
|
||||||
{
|
{
|
||||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
|
@ -32,6 +32,16 @@ SECTIONS
|
|||||||
__module_initcall_end = .;
|
__module_initcall_end = .;
|
||||||
} >FLASH
|
} >FLASH
|
||||||
|
|
||||||
|
/* settings init sections */
|
||||||
|
.initcallsettings.init :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__settings_initcall_start = .;
|
||||||
|
KEEP(*(.initcallsettings.init))
|
||||||
|
. = ALIGN(4);
|
||||||
|
__settings_initcall_end = .;
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
.ARM.extab :
|
.ARM.extab :
|
||||||
{
|
{
|
||||||
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
*(.ARM.extab* .gnu.linkonce.armextab.*)
|
||||||
|
@ -39,6 +39,15 @@ SECTIONS
|
|||||||
__module_initcall_end = .;
|
__module_initcall_end = .;
|
||||||
} >FLASH
|
} >FLASH
|
||||||
|
|
||||||
|
/* settings init sections */
|
||||||
|
.initcallsettings.init :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__settings_initcall_start = .;
|
||||||
|
KEEP(*(.initcallsettings.init))
|
||||||
|
. = ALIGN(4);
|
||||||
|
__settings_initcall_end = .;
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* C++ exception handling.
|
* C++ exception handling.
|
||||||
|
@ -39,6 +39,16 @@ SECTIONS
|
|||||||
__module_initcall_end = .;
|
__module_initcall_end = .;
|
||||||
} >FLASH
|
} >FLASH
|
||||||
|
|
||||||
|
/* settings init sections */
|
||||||
|
.initcallsettings.init :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__settings_initcall_start = .;
|
||||||
|
KEEP(*(.initcallsettings.init))
|
||||||
|
. = ALIGN(4);
|
||||||
|
__settings_initcall_end = .;
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* C++ exception handling.
|
* C++ exception handling.
|
||||||
*/
|
*/
|
||||||
|
@ -39,6 +39,16 @@ SECTIONS
|
|||||||
__module_initcall_end = .;
|
__module_initcall_end = .;
|
||||||
} >FLASH
|
} >FLASH
|
||||||
|
|
||||||
|
/* settings init sections */
|
||||||
|
.initcallsettings.init :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__settings_initcall_start = .;
|
||||||
|
KEEP(*(.initcallsettings.init))
|
||||||
|
. = ALIGN(4);
|
||||||
|
__settings_initcall_end = .;
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* C++ exception handling.
|
* C++ exception handling.
|
||||||
*/
|
*/
|
||||||
|
@ -39,6 +39,16 @@ SECTIONS
|
|||||||
__module_initcall_end = .;
|
__module_initcall_end = .;
|
||||||
} >FLASH
|
} >FLASH
|
||||||
|
|
||||||
|
/* settings init sections */
|
||||||
|
.initcallsettings.init :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__settings_initcall_start = .;
|
||||||
|
KEEP(*(.initcallsettings.init))
|
||||||
|
. = ALIGN(4);
|
||||||
|
__settings_initcall_end = .;
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* C++ exception handling.
|
* C++ exception handling.
|
||||||
*/
|
*/
|
||||||
|
@ -39,6 +39,16 @@ SECTIONS
|
|||||||
__module_initcall_end = .;
|
__module_initcall_end = .;
|
||||||
} >FLASH
|
} >FLASH
|
||||||
|
|
||||||
|
/* settings init sections */
|
||||||
|
.initcallsettings.init :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__settings_initcall_start = .;
|
||||||
|
KEEP(*(.initcallsettings.init))
|
||||||
|
. = ALIGN(4);
|
||||||
|
__settings_initcall_end = .;
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* C++ exception handling.
|
* C++ exception handling.
|
||||||
*/
|
*/
|
||||||
|
@ -39,6 +39,16 @@ SECTIONS
|
|||||||
__module_initcall_end = .;
|
__module_initcall_end = .;
|
||||||
} >FLASH
|
} >FLASH
|
||||||
|
|
||||||
|
/* settings init sections */
|
||||||
|
.initcallsettings.init :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__settings_initcall_start = .;
|
||||||
|
KEEP(*(.initcallsettings.init))
|
||||||
|
. = ALIGN(4);
|
||||||
|
__settings_initcall_end = .;
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* C++ exception handling.
|
* C++ exception handling.
|
||||||
*/
|
*/
|
||||||
|
@ -39,6 +39,16 @@ SECTIONS
|
|||||||
__module_initcall_end = .;
|
__module_initcall_end = .;
|
||||||
} >FLASH
|
} >FLASH
|
||||||
|
|
||||||
|
/* settings init sections */
|
||||||
|
.initcallsettings.init :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
__settings_initcall_start = .;
|
||||||
|
KEEP(*(.initcallsettings.init))
|
||||||
|
. = ALIGN(4);
|
||||||
|
__settings_initcall_end = .;
|
||||||
|
} >FLASH
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* C++ exception handling.
|
* C++ exception handling.
|
||||||
*/
|
*/
|
||||||
|
@ -77,8 +77,6 @@ UAVOBJSRCFILENAMES += mixerstatus
|
|||||||
UAVOBJSRCFILENAMES += nedaccel
|
UAVOBJSRCFILENAMES += nedaccel
|
||||||
UAVOBJSRCFILENAMES += objectpersistence
|
UAVOBJSRCFILENAMES += objectpersistence
|
||||||
UAVOBJSRCFILENAMES += oplinkreceiver
|
UAVOBJSRCFILENAMES += oplinkreceiver
|
||||||
UAVOBJSRCFILENAMES += overosyncstats
|
|
||||||
UAVOBJSRCFILENAMES += overosyncsettings
|
|
||||||
UAVOBJSRCFILENAMES += pathaction
|
UAVOBJSRCFILENAMES += pathaction
|
||||||
UAVOBJSRCFILENAMES += pathdesired
|
UAVOBJSRCFILENAMES += pathdesired
|
||||||
UAVOBJSRCFILENAMES += pathplan
|
UAVOBJSRCFILENAMES += pathplan
|
||||||
|
@ -107,6 +107,7 @@ void PIOS_Board_Init(void)
|
|||||||
/* Initialize UAVObject libraries */
|
/* Initialize UAVObject libraries */
|
||||||
EventDispatcherInitialize();
|
EventDispatcherInitialize();
|
||||||
UAVObjInitialize();
|
UAVObjInitialize();
|
||||||
|
SETTINGS_INITIALISE_ALL;
|
||||||
|
|
||||||
#if defined(PIOS_INCLUDE_RTC)
|
#if defined(PIOS_INCLUDE_RTC)
|
||||||
/* Initialize the real-time clock and its associated tick */
|
/* Initialize the real-time clock and its associated tick */
|
||||||
@ -123,8 +124,6 @@ void PIOS_Board_Init(void)
|
|||||||
PIOS_IAP_WriteBootCmd(2, 0);
|
PIOS_IAP_WriteBootCmd(2, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
HwSettingsInitialize();
|
|
||||||
|
|
||||||
#ifndef ERASE_FLASH
|
#ifndef ERASE_FLASH
|
||||||
#ifdef PIOS_INCLUDE_WDG
|
#ifdef PIOS_INCLUDE_WDG
|
||||||
/* Initialize watchdog as early as possible to catch faults during init */
|
/* Initialize watchdog as early as possible to catch faults during init */
|
||||||
@ -285,7 +284,6 @@ void PIOS_Board_Init(void)
|
|||||||
// Attach the board config check hook
|
// Attach the board config check hook
|
||||||
SANITYCHECK_AttachHook(&CopterControlConfigHook);
|
SANITYCHECK_AttachHook(&CopterControlConfigHook);
|
||||||
// trigger a config check if actuatorsettings are updated
|
// trigger a config check if actuatorsettings are updated
|
||||||
ActuatorSettingsInitialize();
|
|
||||||
ActuatorSettingsConnectCallback(ActuatorSettingsUpdatedCb);
|
ActuatorSettingsConnectCallback(ActuatorSettingsUpdatedCb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +94,6 @@ ifndef TESTAPP
|
|||||||
SRC += $(FLIGHT_UAVOBJ_DIR)/objectpersistence.c
|
SRC += $(FLIGHT_UAVOBJ_DIR)/objectpersistence.c
|
||||||
SRC += $(FLIGHT_UAVOBJ_DIR)/gcstelemetrystats.c
|
SRC += $(FLIGHT_UAVOBJ_DIR)/gcstelemetrystats.c
|
||||||
SRC += $(FLIGHT_UAVOBJ_DIR)/flighttelemetrystats.c
|
SRC += $(FLIGHT_UAVOBJ_DIR)/flighttelemetrystats.c
|
||||||
SRC += $(FLIGHT_UAVOBJ_DIR)/faultsettings.c
|
|
||||||
SRC += $(FLIGHT_UAVOBJ_DIR)/flightstatus.c
|
SRC += $(FLIGHT_UAVOBJ_DIR)/flightstatus.c
|
||||||
SRC += $(FLIGHT_UAVOBJ_DIR)/systemstats.c
|
SRC += $(FLIGHT_UAVOBJ_DIR)/systemstats.c
|
||||||
SRC += $(FLIGHT_UAVOBJ_DIR)/systemalarms.c
|
SRC += $(FLIGHT_UAVOBJ_DIR)/systemalarms.c
|
||||||
|
@ -159,6 +159,7 @@ void PIOS_Board_Init(void)
|
|||||||
/* Initialize UAVObject libraries */
|
/* Initialize UAVObject libraries */
|
||||||
EventDispatcherInitialize();
|
EventDispatcherInitialize();
|
||||||
UAVObjInitialize();
|
UAVObjInitialize();
|
||||||
|
SETTINGS_INITIALISE_ALL;
|
||||||
|
|
||||||
#if defined(PIOS_INCLUDE_RTC)
|
#if defined(PIOS_INCLUDE_RTC)
|
||||||
/* Initialize the real-time clock and its associated tick */
|
/* Initialize the real-time clock and its associated tick */
|
||||||
@ -175,8 +176,6 @@ void PIOS_Board_Init(void)
|
|||||||
PIOS_IAP_WriteBootCmd(2, 0);
|
PIOS_IAP_WriteBootCmd(2, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
HwSettingsInitialize();
|
|
||||||
|
|
||||||
#ifndef ERASE_FLASH
|
#ifndef ERASE_FLASH
|
||||||
#ifdef PIOS_INCLUDE_WDG
|
#ifdef PIOS_INCLUDE_WDG
|
||||||
/* Initialize watchdog as early as possible to catch faults during init */
|
/* Initialize watchdog as early as possible to catch faults during init */
|
||||||
@ -331,7 +330,6 @@ void PIOS_Board_Init(void)
|
|||||||
// Attach the board config check hook
|
// Attach the board config check hook
|
||||||
SANITYCHECK_AttachHook(&CopterControlConfigHook);
|
SANITYCHECK_AttachHook(&CopterControlConfigHook);
|
||||||
// trigger a config check if actuatorsettings are updated
|
// trigger a config check if actuatorsettings are updated
|
||||||
ActuatorSettingsInitialize();
|
|
||||||
ActuatorSettingsConnectCallback(ActuatorSettingsUpdatedCb);
|
ActuatorSettingsConnectCallback(ActuatorSettingsUpdatedCb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,8 +77,6 @@ UAVOBJSRCFILENAMES += mixerstatus
|
|||||||
UAVOBJSRCFILENAMES += nedaccel
|
UAVOBJSRCFILENAMES += nedaccel
|
||||||
UAVOBJSRCFILENAMES += objectpersistence
|
UAVOBJSRCFILENAMES += objectpersistence
|
||||||
UAVOBJSRCFILENAMES += oplinkreceiver
|
UAVOBJSRCFILENAMES += oplinkreceiver
|
||||||
UAVOBJSRCFILENAMES += overosyncstats
|
|
||||||
UAVOBJSRCFILENAMES += overosyncsettings
|
|
||||||
UAVOBJSRCFILENAMES += pathaction
|
UAVOBJSRCFILENAMES += pathaction
|
||||||
UAVOBJSRCFILENAMES += pathdesired
|
UAVOBJSRCFILENAMES += pathdesired
|
||||||
UAVOBJSRCFILENAMES += pathplan
|
UAVOBJSRCFILENAMES += pathplan
|
||||||
|
@ -187,7 +187,7 @@ void PIOS_Board_Init(void)
|
|||||||
/* Initialize UAVObject libraries */
|
/* Initialize UAVObject libraries */
|
||||||
EventDispatcherInitialize();
|
EventDispatcherInitialize();
|
||||||
UAVObjInitialize();
|
UAVObjInitialize();
|
||||||
HwSettingsInitialize();
|
SETTINGS_INITIALISE_ALL;
|
||||||
|
|
||||||
/* Initialize the alarms library */
|
/* Initialize the alarms library */
|
||||||
AlarmsInitialize();
|
AlarmsInitialize();
|
||||||
|
@ -77,8 +77,6 @@ UAVOBJSRCFILENAMES += mixerstatus
|
|||||||
UAVOBJSRCFILENAMES += nedaccel
|
UAVOBJSRCFILENAMES += nedaccel
|
||||||
UAVOBJSRCFILENAMES += objectpersistence
|
UAVOBJSRCFILENAMES += objectpersistence
|
||||||
UAVOBJSRCFILENAMES += oplinkreceiver
|
UAVOBJSRCFILENAMES += oplinkreceiver
|
||||||
UAVOBJSRCFILENAMES += overosyncstats
|
|
||||||
UAVOBJSRCFILENAMES += overosyncsettings
|
|
||||||
UAVOBJSRCFILENAMES += pathaction
|
UAVOBJSRCFILENAMES += pathaction
|
||||||
UAVOBJSRCFILENAMES += pathdesired
|
UAVOBJSRCFILENAMES += pathdesired
|
||||||
UAVOBJSRCFILENAMES += pathplan
|
UAVOBJSRCFILENAMES += pathplan
|
||||||
|
@ -135,6 +135,7 @@ void PIOS_Board_Init(void)
|
|||||||
/* Initialize UAVObject libraries */
|
/* Initialize UAVObject libraries */
|
||||||
EventDispatcherInitialize();
|
EventDispatcherInitialize();
|
||||||
UAVObjInitialize();
|
UAVObjInitialize();
|
||||||
|
SETTINGS_INITIALISE_ALL;
|
||||||
|
|
||||||
#if defined(PIOS_INCLUDE_RTC)
|
#if defined(PIOS_INCLUDE_RTC)
|
||||||
/* Initialize the real-time clock and its associated tick */
|
/* Initialize the real-time clock and its associated tick */
|
||||||
@ -151,9 +152,6 @@ void PIOS_Board_Init(void)
|
|||||||
PIOS_IAP_WriteBootCmd(2, 0);
|
PIOS_IAP_WriteBootCmd(2, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
HwSettingsInitialize();
|
|
||||||
HwSPRacingF3EVOSettingsInitialize();
|
|
||||||
|
|
||||||
#ifndef ERASE_FLASH
|
#ifndef ERASE_FLASH
|
||||||
#ifdef PIOS_INCLUDE_WDG
|
#ifdef PIOS_INCLUDE_WDG
|
||||||
/* Initialize watchdog as early as possible to catch faults during init */
|
/* Initialize watchdog as early as possible to catch faults during init */
|
||||||
|
@ -101,6 +101,7 @@ void PIOS_Board_Init(void)
|
|||||||
/* Initialize UAVObject libraries */
|
/* Initialize UAVObject libraries */
|
||||||
EventDispatcherInitialize();
|
EventDispatcherInitialize();
|
||||||
UAVObjInitialize();
|
UAVObjInitialize();
|
||||||
|
SETTINGS_INITIALISE_ALL;
|
||||||
|
|
||||||
/* Set up the SPI interface to the rfm22b */
|
/* Set up the SPI interface to the rfm22b */
|
||||||
if (PIOS_SPI_Init(&pios_spi_rfm22b_id, &pios_spi_rfm22b_cfg)) {
|
if (PIOS_SPI_Init(&pios_spi_rfm22b_id, &pios_spi_rfm22b_cfg)) {
|
||||||
@ -133,7 +134,6 @@ void PIOS_Board_Init(void)
|
|||||||
PIOS_IAP_WriteBootCmd(2, 0);
|
PIOS_IAP_WriteBootCmd(2, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
OPLinkSettingsInitialize();
|
|
||||||
OPLinkReceiverInitialize();
|
OPLinkReceiverInitialize();
|
||||||
|
|
||||||
/* Retrieve the settings object. */
|
/* Retrieve the settings object. */
|
||||||
|
@ -170,8 +170,7 @@ void PIOS_Board_Init(void)
|
|||||||
/* Initialize UAVObject libraries */
|
/* Initialize UAVObject libraries */
|
||||||
EventDispatcherInitialize();
|
EventDispatcherInitialize();
|
||||||
UAVObjInitialize();
|
UAVObjInitialize();
|
||||||
|
SETTINGS_INITIALISE_ALL;
|
||||||
HwSettingsInitialize();
|
|
||||||
|
|
||||||
#ifdef PIOS_INCLUDE_WDG
|
#ifdef PIOS_INCLUDE_WDG
|
||||||
/* Initialize watchdog as early as possible to catch faults during init */
|
/* Initialize watchdog as early as possible to catch faults during init */
|
||||||
|
@ -77,8 +77,6 @@ UAVOBJSRCFILENAMES += mixerstatus
|
|||||||
UAVOBJSRCFILENAMES += nedaccel
|
UAVOBJSRCFILENAMES += nedaccel
|
||||||
UAVOBJSRCFILENAMES += objectpersistence
|
UAVOBJSRCFILENAMES += objectpersistence
|
||||||
UAVOBJSRCFILENAMES += oplinkreceiver
|
UAVOBJSRCFILENAMES += oplinkreceiver
|
||||||
UAVOBJSRCFILENAMES += overosyncstats
|
|
||||||
UAVOBJSRCFILENAMES += overosyncsettings
|
|
||||||
UAVOBJSRCFILENAMES += pathaction
|
UAVOBJSRCFILENAMES += pathaction
|
||||||
UAVOBJSRCFILENAMES += pathdesired
|
UAVOBJSRCFILENAMES += pathdesired
|
||||||
UAVOBJSRCFILENAMES += pathplan
|
UAVOBJSRCFILENAMES += pathplan
|
||||||
|
@ -136,6 +136,7 @@ void PIOS_Board_Init(void)
|
|||||||
/* Initialize UAVObject libraries */
|
/* Initialize UAVObject libraries */
|
||||||
EventDispatcherInitialize();
|
EventDispatcherInitialize();
|
||||||
UAVObjInitialize();
|
UAVObjInitialize();
|
||||||
|
SETTINGS_INITIALISE_ALL;
|
||||||
|
|
||||||
#if defined(PIOS_INCLUDE_RTC)
|
#if defined(PIOS_INCLUDE_RTC)
|
||||||
/* Initialize the real-time clock and its associated tick */
|
/* Initialize the real-time clock and its associated tick */
|
||||||
@ -152,9 +153,6 @@ void PIOS_Board_Init(void)
|
|||||||
PIOS_IAP_WriteBootCmd(2, 0);
|
PIOS_IAP_WriteBootCmd(2, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
HwSettingsInitialize();
|
|
||||||
HwPikoBLXSettingsInitialize();
|
|
||||||
|
|
||||||
#ifndef ERASE_FLASH
|
#ifndef ERASE_FLASH
|
||||||
#ifdef PIOS_INCLUDE_WDG
|
#ifdef PIOS_INCLUDE_WDG
|
||||||
/* Initialize watchdog as early as possible to catch faults during init */
|
/* Initialize watchdog as early as possible to catch faults during init */
|
||||||
|
@ -77,8 +77,6 @@ UAVOBJSRCFILENAMES += mixerstatus
|
|||||||
UAVOBJSRCFILENAMES += nedaccel
|
UAVOBJSRCFILENAMES += nedaccel
|
||||||
UAVOBJSRCFILENAMES += objectpersistence
|
UAVOBJSRCFILENAMES += objectpersistence
|
||||||
UAVOBJSRCFILENAMES += oplinkreceiver
|
UAVOBJSRCFILENAMES += oplinkreceiver
|
||||||
UAVOBJSRCFILENAMES += overosyncstats
|
|
||||||
UAVOBJSRCFILENAMES += overosyncsettings
|
|
||||||
UAVOBJSRCFILENAMES += pathaction
|
UAVOBJSRCFILENAMES += pathaction
|
||||||
UAVOBJSRCFILENAMES += pathdesired
|
UAVOBJSRCFILENAMES += pathdesired
|
||||||
UAVOBJSRCFILENAMES += pathplan
|
UAVOBJSRCFILENAMES += pathplan
|
||||||
|
@ -179,7 +179,7 @@ void PIOS_Board_Init(void)
|
|||||||
/* Initialize UAVObject libraries */
|
/* Initialize UAVObject libraries */
|
||||||
EventDispatcherInitialize();
|
EventDispatcherInitialize();
|
||||||
UAVObjInitialize();
|
UAVObjInitialize();
|
||||||
HwSettingsInitialize();
|
SETTINGS_INITIALISE_ALL;
|
||||||
|
|
||||||
/* Initialize the alarms library */
|
/* Initialize the alarms library */
|
||||||
AlarmsInitialize();
|
AlarmsInitialize();
|
||||||
|
@ -77,8 +77,6 @@ UAVOBJSRCFILENAMES += mixerstatus
|
|||||||
UAVOBJSRCFILENAMES += nedaccel
|
UAVOBJSRCFILENAMES += nedaccel
|
||||||
UAVOBJSRCFILENAMES += objectpersistence
|
UAVOBJSRCFILENAMES += objectpersistence
|
||||||
UAVOBJSRCFILENAMES += oplinkreceiver
|
UAVOBJSRCFILENAMES += oplinkreceiver
|
||||||
UAVOBJSRCFILENAMES += overosyncstats
|
|
||||||
UAVOBJSRCFILENAMES += overosyncsettings
|
|
||||||
UAVOBJSRCFILENAMES += pathaction
|
UAVOBJSRCFILENAMES += pathaction
|
||||||
UAVOBJSRCFILENAMES += pathdesired
|
UAVOBJSRCFILENAMES += pathdesired
|
||||||
UAVOBJSRCFILENAMES += pathplan
|
UAVOBJSRCFILENAMES += pathplan
|
||||||
|
@ -171,7 +171,7 @@ void PIOS_Board_Init(void)
|
|||||||
/* Initialize UAVObject libraries */
|
/* Initialize UAVObject libraries */
|
||||||
EventDispatcherInitialize();
|
EventDispatcherInitialize();
|
||||||
UAVObjInitialize();
|
UAVObjInitialize();
|
||||||
HwSettingsInitialize();
|
SETTINGS_INITIALISE_ALL;
|
||||||
|
|
||||||
/* Initialize the alarms library */
|
/* Initialize the alarms library */
|
||||||
AlarmsInitialize();
|
AlarmsInitialize();
|
||||||
@ -289,7 +289,6 @@ void PIOS_Board_Init(void)
|
|||||||
// Attach the board config check hook
|
// Attach the board config check hook
|
||||||
SANITYCHECK_AttachHook(&RevoNanoConfigHook);
|
SANITYCHECK_AttachHook(&RevoNanoConfigHook);
|
||||||
// trigger a config check if actuatorsettings are updated
|
// trigger a config check if actuatorsettings are updated
|
||||||
ActuatorSettingsInitialize();
|
|
||||||
ActuatorSettingsConnectCallback(ActuatorSettingsUpdatedCb);
|
ActuatorSettingsConnectCallback(ActuatorSettingsUpdatedCb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -131,8 +131,7 @@ void PIOS_Board_Init(void)
|
|||||||
/* Initialize UAVObject libraries */
|
/* Initialize UAVObject libraries */
|
||||||
EventDispatcherInitialize();
|
EventDispatcherInitialize();
|
||||||
UAVObjInitialize();
|
UAVObjInitialize();
|
||||||
|
SETTINGS_INITIALISE_ALL;
|
||||||
HwSettingsInitialize();
|
|
||||||
|
|
||||||
/* Initialize the alarms library */
|
/* Initialize the alarms library */
|
||||||
AlarmsInitialize();
|
AlarmsInitialize();
|
||||||
|
@ -79,7 +79,6 @@ UAVOBJSRCFILENAMES += mixersettings
|
|||||||
UAVOBJSRCFILENAMES += mixerstatus
|
UAVOBJSRCFILENAMES += mixerstatus
|
||||||
UAVOBJSRCFILENAMES += nedaccel
|
UAVOBJSRCFILENAMES += nedaccel
|
||||||
UAVOBJSRCFILENAMES += objectpersistence
|
UAVOBJSRCFILENAMES += objectpersistence
|
||||||
UAVOBJSRCFILENAMES += overosyncstats
|
|
||||||
UAVOBJSRCFILENAMES += pathaction
|
UAVOBJSRCFILENAMES += pathaction
|
||||||
UAVOBJSRCFILENAMES += pathdesired
|
UAVOBJSRCFILENAMES += pathdesired
|
||||||
UAVOBJSRCFILENAMES += pathplan
|
UAVOBJSRCFILENAMES += pathplan
|
||||||
|
@ -142,8 +142,6 @@ void PIOS_Board_Init(void)
|
|||||||
EventDispatcherInitialize();
|
EventDispatcherInitialize();
|
||||||
UAVObjInitialize();
|
UAVObjInitialize();
|
||||||
|
|
||||||
HwSettingsInitialize();
|
|
||||||
|
|
||||||
UAVObjectsInitializeAll();
|
UAVObjectsInitializeAll();
|
||||||
|
|
||||||
/* Initialize the alarms library */
|
/* Initialize the alarms library */
|
||||||
|
@ -77,8 +77,6 @@ UAVOBJSRCFILENAMES += mixerstatus
|
|||||||
UAVOBJSRCFILENAMES += nedaccel
|
UAVOBJSRCFILENAMES += nedaccel
|
||||||
UAVOBJSRCFILENAMES += objectpersistence
|
UAVOBJSRCFILENAMES += objectpersistence
|
||||||
UAVOBJSRCFILENAMES += oplinkreceiver
|
UAVOBJSRCFILENAMES += oplinkreceiver
|
||||||
UAVOBJSRCFILENAMES += overosyncstats
|
|
||||||
UAVOBJSRCFILENAMES += overosyncsettings
|
|
||||||
UAVOBJSRCFILENAMES += pathaction
|
UAVOBJSRCFILENAMES += pathaction
|
||||||
UAVOBJSRCFILENAMES += pathdesired
|
UAVOBJSRCFILENAMES += pathdesired
|
||||||
UAVOBJSRCFILENAMES += pathplan
|
UAVOBJSRCFILENAMES += pathplan
|
||||||
|
@ -173,7 +173,7 @@ void PIOS_Board_Init(void)
|
|||||||
/* Initialize UAVObject libraries */
|
/* Initialize UAVObject libraries */
|
||||||
EventDispatcherInitialize();
|
EventDispatcherInitialize();
|
||||||
UAVObjInitialize();
|
UAVObjInitialize();
|
||||||
HwSettingsInitialize();
|
SETTINGS_INITIALISE_ALL;
|
||||||
|
|
||||||
/* Initialize the alarms library */
|
/* Initialize the alarms library */
|
||||||
AlarmsInitialize();
|
AlarmsInitialize();
|
||||||
|
@ -77,8 +77,6 @@ UAVOBJSRCFILENAMES += mixerstatus
|
|||||||
UAVOBJSRCFILENAMES += nedaccel
|
UAVOBJSRCFILENAMES += nedaccel
|
||||||
UAVOBJSRCFILENAMES += objectpersistence
|
UAVOBJSRCFILENAMES += objectpersistence
|
||||||
UAVOBJSRCFILENAMES += oplinkreceiver
|
UAVOBJSRCFILENAMES += oplinkreceiver
|
||||||
UAVOBJSRCFILENAMES += overosyncstats
|
|
||||||
UAVOBJSRCFILENAMES += overosyncsettings
|
|
||||||
UAVOBJSRCFILENAMES += pathaction
|
UAVOBJSRCFILENAMES += pathaction
|
||||||
UAVOBJSRCFILENAMES += pathdesired
|
UAVOBJSRCFILENAMES += pathdesired
|
||||||
UAVOBJSRCFILENAMES += pathplan
|
UAVOBJSRCFILENAMES += pathplan
|
||||||
|
@ -124,6 +124,7 @@ void PIOS_Board_Init(void)
|
|||||||
/* Initialize UAVObject libraries */
|
/* Initialize UAVObject libraries */
|
||||||
EventDispatcherInitialize();
|
EventDispatcherInitialize();
|
||||||
UAVObjInitialize();
|
UAVObjInitialize();
|
||||||
|
SETTINGS_INITIALISE_ALL;
|
||||||
|
|
||||||
#if defined(PIOS_INCLUDE_RTC)
|
#if defined(PIOS_INCLUDE_RTC)
|
||||||
/* Initialize the real-time clock and its associated tick */
|
/* Initialize the real-time clock and its associated tick */
|
||||||
@ -140,9 +141,6 @@ void PIOS_Board_Init(void)
|
|||||||
PIOS_IAP_WriteBootCmd(2, 0);
|
PIOS_IAP_WriteBootCmd(2, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
HwSettingsInitialize();
|
|
||||||
HwSPRacingF3SettingsInitialize();
|
|
||||||
|
|
||||||
#ifndef ERASE_FLASH
|
#ifndef ERASE_FLASH
|
||||||
#ifdef PIOS_INCLUDE_WDG
|
#ifdef PIOS_INCLUDE_WDG
|
||||||
/* Initialize watchdog as early as possible to catch faults during init */
|
/* Initialize watchdog as early as possible to catch faults during init */
|
||||||
|
@ -77,8 +77,6 @@ UAVOBJSRCFILENAMES += mixerstatus
|
|||||||
UAVOBJSRCFILENAMES += nedaccel
|
UAVOBJSRCFILENAMES += nedaccel
|
||||||
UAVOBJSRCFILENAMES += objectpersistence
|
UAVOBJSRCFILENAMES += objectpersistence
|
||||||
UAVOBJSRCFILENAMES += oplinkreceiver
|
UAVOBJSRCFILENAMES += oplinkreceiver
|
||||||
UAVOBJSRCFILENAMES += overosyncstats
|
|
||||||
UAVOBJSRCFILENAMES += overosyncsettings
|
|
||||||
UAVOBJSRCFILENAMES += pathaction
|
UAVOBJSRCFILENAMES += pathaction
|
||||||
UAVOBJSRCFILENAMES += pathdesired
|
UAVOBJSRCFILENAMES += pathdesired
|
||||||
UAVOBJSRCFILENAMES += pathplan
|
UAVOBJSRCFILENAMES += pathplan
|
||||||
|
@ -135,6 +135,7 @@ void PIOS_Board_Init(void)
|
|||||||
/* Initialize UAVObject libraries */
|
/* Initialize UAVObject libraries */
|
||||||
EventDispatcherInitialize();
|
EventDispatcherInitialize();
|
||||||
UAVObjInitialize();
|
UAVObjInitialize();
|
||||||
|
SETTINGS_INITIALISE_ALL;
|
||||||
|
|
||||||
#if defined(PIOS_INCLUDE_RTC)
|
#if defined(PIOS_INCLUDE_RTC)
|
||||||
/* Initialize the real-time clock and its associated tick */
|
/* Initialize the real-time clock and its associated tick */
|
||||||
@ -151,9 +152,6 @@ void PIOS_Board_Init(void)
|
|||||||
PIOS_IAP_WriteBootCmd(2, 0);
|
PIOS_IAP_WriteBootCmd(2, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
HwSettingsInitialize();
|
|
||||||
HwSPRacingF3EVOSettingsInitialize();
|
|
||||||
|
|
||||||
#ifndef ERASE_FLASH
|
#ifndef ERASE_FLASH
|
||||||
#ifdef PIOS_INCLUDE_WDG
|
#ifdef PIOS_INCLUDE_WDG
|
||||||
/* Initialize watchdog as early as possible to catch faults during init */
|
/* Initialize watchdog as early as possible to catch faults during init */
|
||||||
|
@ -77,8 +77,6 @@ UAVOBJSRCFILENAMES += mixerstatus
|
|||||||
UAVOBJSRCFILENAMES += nedaccel
|
UAVOBJSRCFILENAMES += nedaccel
|
||||||
UAVOBJSRCFILENAMES += objectpersistence
|
UAVOBJSRCFILENAMES += objectpersistence
|
||||||
UAVOBJSRCFILENAMES += oplinkreceiver
|
UAVOBJSRCFILENAMES += oplinkreceiver
|
||||||
UAVOBJSRCFILENAMES += overosyncstats
|
|
||||||
UAVOBJSRCFILENAMES += overosyncsettings
|
|
||||||
UAVOBJSRCFILENAMES += pathaction
|
UAVOBJSRCFILENAMES += pathaction
|
||||||
UAVOBJSRCFILENAMES += pathdesired
|
UAVOBJSRCFILENAMES += pathdesired
|
||||||
UAVOBJSRCFILENAMES += pathplan
|
UAVOBJSRCFILENAMES += pathplan
|
||||||
|
@ -146,6 +146,7 @@ void PIOS_Board_Init(void)
|
|||||||
/* Initialize UAVObject libraries */
|
/* Initialize UAVObject libraries */
|
||||||
EventDispatcherInitialize();
|
EventDispatcherInitialize();
|
||||||
UAVObjInitialize();
|
UAVObjInitialize();
|
||||||
|
SETTINGS_INITIALISE_ALL;
|
||||||
|
|
||||||
#if defined(PIOS_INCLUDE_RTC)
|
#if defined(PIOS_INCLUDE_RTC)
|
||||||
/* Initialize the real-time clock and its associated tick */
|
/* Initialize the real-time clock and its associated tick */
|
||||||
@ -162,9 +163,6 @@ void PIOS_Board_Init(void)
|
|||||||
PIOS_IAP_WriteBootCmd(2, 0);
|
PIOS_IAP_WriteBootCmd(2, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
HwSettingsInitialize();
|
|
||||||
HwTinyFISHSettingsInitialize();
|
|
||||||
|
|
||||||
#ifndef ERASE_FLASH
|
#ifndef ERASE_FLASH
|
||||||
#ifdef PIOS_INCLUDE_WDG
|
#ifdef PIOS_INCLUDE_WDG
|
||||||
/* Initialize watchdog as early as possible to catch faults during init */
|
/* Initialize watchdog as early as possible to catch faults during init */
|
||||||
|
@ -46,6 +46,10 @@ static UAVObjHandle handle __attribute__((section("__DATA,_uavo_handles")));
|
|||||||
static UAVObjHandle handle __attribute__((section("_uavo_handles")));
|
static UAVObjHandle handle __attribute__((section("_uavo_handles")));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if $(NAMEUC)_ISSETTINGS
|
||||||
|
SETTINGS_INITCALL($(NAME)Initialize);
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize object.
|
* Initialize object.
|
||||||
* \return 0 Success
|
* \return 0 Success
|
||||||
|
Loading…
Reference in New Issue
Block a user