Beispiel #1
0
/**
 * Initialize the module, called on startup.
 * \returns 0 on success or -1 if initialization failed
 */
int32_t SystemModInitialize(void)
{

	// Must registers objects here for system thread because ObjectManager started in OpenPilotInit
	SystemSettingsInitialize();
	SystemStatsInitialize();
	FlightStatusInitialize();
	//ObjectPersistenceInitialize(); moved to pios board due to different bootstraping
#if defined(DIAG_TASKS)
	TaskInfoInitialize();
#endif
#if defined(I2C_WDG_STATS_DIAGNOSTICS)
	I2CStatsInitialize();
	WatchdogStatusInitialize();
#endif

	//objectPersistenceQueue = xQueueCreate(1, sizeof(UAVObjEvent));
	//if (objectPersistenceQueue == NULL)
	//	return -1;

	/* Edited for raspberry pilot, the systemodstart is not automatically called
	 * it is called just after MODULE_INITIALISE_ALL in initTask(), but the system
	 * waits for objectpersitance (over uavlink) to load all the settings
	 */
	//SystemModStart();

	return 0;
}
Beispiel #2
0
/**
 * Initialize the module, called on startup.
 * \returns 0 on success or -1 if initialization failed
 */
int32_t SystemModInitialize(void)
{

	// Must registers objects here for system thread because ObjectManager started in OpenPilotInit
	SystemSettingsInitialize();
	SystemStatsInitialize();
	ObjectPersistenceInitialize();
#if defined(DIAGNOSTICS)
	TaskInfoInitialize();
	I2CStatsInitialize();
	WatchdogStatusInitialize();
#endif

	SystemModStart();

	return 0;
}
Beispiel #3
0
/**
 * Module initialization
 */
int32_t ManualControlInitialize()
{
    /* Check the assumptions about uavobject enum's are correct */
    PIOS_STATIC_ASSERT(assumptions);

    ManualControlCommandInitialize();
    FlightStatusInitialize();
    ManualControlSettingsInitialize();
    FlightModeSettingsInitialize();
    SystemSettingsInitialize();
    StabilizationSettingsInitialize();
#ifndef PIOS_EXCLUDE_ADVANCED_FEATURES
    VtolSelfTuningStatsInitialize();
    VtolPathFollowerSettingsInitialize();
    VtolPathFollowerSettingsConnectCallback(&SettingsUpdatedCb);
    SystemSettingsConnectCallback(&SettingsUpdatedCb);
#endif
    callbackHandle = PIOS_CALLBACKSCHEDULER_Create(&manualControlTask, CALLBACK_PRIORITY, CBTASK_PRIORITY, CALLBACKINFO_RUNNING_MANUALCONTROL, STACK_SIZE_BYTES);

    return 0;
}
/**
 * Function used to initialize the first instance of each object.
 * This file is automatically updated by the UAVObjectGenerator.
 */
void UAVObjectsInitializeAll()
{
    ActuatorCommandInitialize();
    ActuatorDesiredInitialize();
    ActuatorSettingsInitialize();
    AHRSCalibrationInitialize();
    AHRSSettingsInitialize();
    AhrsStatusInitialize();
    AttitudeActualInitialize();
    AttitudeDesiredInitialize();
    AttitudeRawInitialize();
    AttitudeSettingsInitialize();
    BaroAltitudeInitialize();
    ExampleObject1Initialize();
    ExampleObject2Initialize();
    ExampleSettingsInitialize();
    FlightBatteryStateInitialize();
    FlightTelemetryStatsInitialize();
    GCSTelemetryStatsInitialize();
    GPSPositionInitialize();
    GPSSatellitesInitialize();
    GPSTimeInitialize();
    HomeLocationInitialize();
    ManualControlCommandInitialize();
    ManualControlSettingsInitialize();
    MixerSettingsInitialize();
    MixerStatusInitialize();
    ObjectPersistenceInitialize();
    PositionActualInitialize();
    StabilizationSettingsInitialize();
    SystemAlarmsInitialize();
    SystemSettingsInitialize();
    SystemStatsInitialize();
    TelemetrySettingsInitialize();
    VTOLSettingsInitialize();
    VTOLStatusInitialize();

}
Beispiel #5
0
/**
 * Initialize the module, called on startup.
 * \returns 0 on success or -1 if initialization failed
 */
int32_t SystemModInitialize(void)
{

	// Must registers objects here for system thread because ObjectManager started in OpenPilotInit
	SystemSettingsInitialize();
	SystemStatsInitialize();
	FlightStatusInitialize();
	ObjectPersistenceInitialize();
#if defined(DIAG_TASKS)
	TaskInfoInitialize();
#endif
#if defined(WDG_STATS_DIAGNOSTICS)
	WatchdogStatusInitialize();
#endif

	objectPersistenceQueue = PIOS_Queue_Create(1, sizeof(UAVObjEvent));
	if (objectPersistenceQueue == NULL)
		return -1;

	SystemModStart();

	return 0;
}