mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
23b2907d08
This compile successfuly with make all_flight
63 lines
2.1 KiB
C
63 lines
2.1 KiB
C
/**
|
|
******************************************************************************
|
|
*
|
|
* @file examplemodevent.c
|
|
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
|
* @brief Example module to be used as a template for actual modules.
|
|
* Event callback version.
|
|
*
|
|
* @see The GNU Public License (GPL) Version 3
|
|
*
|
|
*****************************************************************************/
|
|
/*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
* for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
*/
|
|
|
|
/**
|
|
* Input objects: ExampleObject1, ExampleSettings
|
|
* Output object: ExampleObject2
|
|
*
|
|
* This module executes in response to ExampleObject1 updates. When the
|
|
* module is triggered it will update the data of ExampleObject2.
|
|
*
|
|
* No threads are used in this example.
|
|
*
|
|
* UAVObjects are automatically generated by the UAVObjectGenerator from
|
|
* the object definition XML file.
|
|
*
|
|
* Modules have no API, all communication to other modules is done through UAVObjects.
|
|
* However modules may use the API exposed by shared libraries.
|
|
* See the OpenPilot wiki for more details.
|
|
* http://www.openpilot.org/OpenPilot_Application_Architecture
|
|
*
|
|
*/
|
|
|
|
#include "openpilot.h"
|
|
#include "examplemodevent.h"
|
|
#include "examplemodperiodic.h"
|
|
#include "examplemodthread.h"
|
|
|
|
void ExampleStart(void)
|
|
{
|
|
ExampleModPeriodicInitialize();
|
|
ExampleModThreadInitialize();
|
|
}
|
|
|
|
void ExampleInitialize(void)
|
|
{
|
|
ExampleModEventInitialize();
|
|
}
|
|
MODULE_INITCALL(ExampleInitialize, ExampleStart);
|