Пример #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;
}
Пример #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;
}
Пример #3
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;
}