Merged in f5soh/librepilot/laurent/LP-92_Feed_forward_remove (pull request #33)
[librepilot.git] / flight / modules / Example / example.c
blobfa62a543963c09a709565e7e6c3499951556e354
1 /**
2 ******************************************************************************
4 * @file examplemodevent.c
5 * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
6 * @brief Example module to be used as a template for actual modules.
7 * Event callback version.
9 * @see The GNU Public License (GPL) Version 3
11 *****************************************************************************/
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 3 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 * for more details.
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 /**
29 * Input objects: ExampleObject1, ExampleSettings
30 * Output object: ExampleObject2
32 * This module executes in response to ExampleObject1 updates. When the
33 * module is triggered it will update the data of ExampleObject2.
35 * No threads are used in this example.
37 * UAVObjects are automatically generated by the UAVObjectGenerator from
38 * the object definition XML file.
40 * Modules have no API, all communication to other modules is done through UAVObjects.
41 * However modules may use the API exposed by shared libraries.
42 * See the OpenPilot wiki for more details.
43 * http://www.openpilot.org/OpenPilot_Application_Architecture
47 #include "openpilot.h"
48 #include "examplemodevent.h"
49 #include "examplemodperiodic.h"
50 #include "examplemodthread.h"
52 void ExampleStart(void)
54 ExampleModPeriodicInitialize();
55 ExampleModThreadInitialize();
58 void ExampleInitialize(void)
60 ExampleModEventInitialize();
62 MODULE_INITCALL(ExampleInitialize, ExampleStart);