From 0e8b618953440cad743ceda3712010c48ef95460 Mon Sep 17 00:00:00 2001 From: gussy Date: Sat, 6 Mar 2010 06:17:17 +0000 Subject: [PATCH] Updated files inside OpenPilot to use the single openpilot.h header file rather than multiple headers inside each file. This resolves a few build warnings/errors and makes the code cleaner. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@257 ebee16cc-31ac-478f-84a7-5cbb03baadba --- .../OpenPilot/Modules/Telemetry/inc/telemetry.h | 4 +--- flight/OpenPilot/System/inc/openpilot.h | 15 ++++++++++----- flight/OpenPilot/System/inc/pios_board.h | 2 +- flight/OpenPilot/UAVObjects/eventdispatcher.c | 9 +-------- flight/OpenPilot/UAVObjects/inc/eventdispatcher.h | 3 --- .../OpenPilot/UAVObjects/inc/uavobjectmanager.h | 4 ---- .../OpenPilot/UAVObjects/inc/uavobjecttemplate.h | 3 --- flight/OpenPilot/UAVObjects/uavobjectmanager.c | 9 +-------- flight/OpenPilot/UAVObjects/uavobjectsinit.c | 2 +- flight/OpenPilot/UAVObjects/uavobjecttemplate.c | 3 +-- flight/OpenPilot/UAVTalk/inc/uavtalk.h | 3 --- flight/OpenPilot/UAVTalk/uavtalk.c | 4 +--- flight/PiOS/pios.h | 9 ++++----- 13 files changed, 21 insertions(+), 49 deletions(-) diff --git a/flight/OpenPilot/Modules/Telemetry/inc/telemetry.h b/flight/OpenPilot/Modules/Telemetry/inc/telemetry.h index 5d6e7f235..3fc44d77f 100644 --- a/flight/OpenPilot/Modules/Telemetry/inc/telemetry.h +++ b/flight/OpenPilot/Modules/Telemetry/inc/telemetry.h @@ -29,8 +29,6 @@ #ifndef TELEMETRY_H #define TELEMETRY_H -#include - -int32_t TelemetryInitialize(); +int32_t TelemetryInitialize(void); #endif // TELEMETRY_H diff --git a/flight/OpenPilot/System/inc/openpilot.h b/flight/OpenPilot/System/inc/openpilot.h index a42345495..7ed3e4bf0 100644 --- a/flight/OpenPilot/System/inc/openpilot.h +++ b/flight/OpenPilot/System/inc/openpilot.h @@ -31,15 +31,20 @@ /* PIOS Includes */ #include +/* OpenPilot Modules */ +#include "telemetry.h" + /* OpenPilot Includes */ #include #include -/* FreeRTOS Includes */ -#include -#include -#include -#include +/* UAVObjects */ +#include "uavobjectmanager.h" +#include "eventdispatcher.h" +#include "utlist.h" + +/* UAVTalk */ +#include "uavtalk.h" /* Global Functions */ extern void OpenPilotInit(void); diff --git a/flight/OpenPilot/System/inc/pios_board.h b/flight/OpenPilot/System/inc/pios_board.h index 7f74a8bc2..8c00df958 100644 --- a/flight/OpenPilot/System/inc/pios_board.h +++ b/flight/OpenPilot/System/inc/pios_board.h @@ -197,7 +197,7 @@ #define PIOS_IRQ_PRIO_HIGHEST 4 // for USART etc... //------------------------- -// Receiver PWM inputs +// Receiver PWM inputs //------------------------- #define RECEIVER1_GPIO_PORT GPIOB #define RECEIVER1_PIN GPIO_Pin_0 // PB0 diff --git a/flight/OpenPilot/UAVObjects/eventdispatcher.c b/flight/OpenPilot/UAVObjects/eventdispatcher.c index 210651b67..9eeeee9fb 100644 --- a/flight/OpenPilot/UAVObjects/eventdispatcher.c +++ b/flight/OpenPilot/UAVObjects/eventdispatcher.c @@ -24,14 +24,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include // for malloc -#include // for memcpy, memcmp -#include "eventdispatcher.h" -#include "utlist.h" -#include "FreeRTOS.h" -#include "task.h" -#include "queue.h" -#include "semphr.h" +#include "openpilot.h" // Private constants #define MAX_QUEUE_SIZE 10 diff --git a/flight/OpenPilot/UAVObjects/inc/eventdispatcher.h b/flight/OpenPilot/UAVObjects/inc/eventdispatcher.h index bcc7b4d4c..7de4173f0 100644 --- a/flight/OpenPilot/UAVObjects/inc/eventdispatcher.h +++ b/flight/OpenPilot/UAVObjects/inc/eventdispatcher.h @@ -26,9 +26,6 @@ #ifndef EVENTDISPATCHER_H #define EVENTDISPATCHER_H -#include -#include "uavobjectmanager.h" - // Public types // Public functions diff --git a/flight/OpenPilot/UAVObjects/inc/uavobjectmanager.h b/flight/OpenPilot/UAVObjects/inc/uavobjectmanager.h index e684a034f..99036d1fe 100644 --- a/flight/OpenPilot/UAVObjects/inc/uavobjectmanager.h +++ b/flight/OpenPilot/UAVObjects/inc/uavobjectmanager.h @@ -26,10 +26,6 @@ #ifndef UAVOBJECTMANAGER_H #define UAVOBJECTMANAGER_H -#include -#include "FreeRTOS.h" -#include "queue.h" - #define UAVOBJ_ALL_INSTANCES 0xFFFF typedef uint32_t UAVObjHandle; diff --git a/flight/OpenPilot/UAVObjects/inc/uavobjecttemplate.h b/flight/OpenPilot/UAVObjects/inc/uavobjecttemplate.h index 114ea9bf8..c565fafb4 100644 --- a/flight/OpenPilot/UAVObjects/inc/uavobjecttemplate.h +++ b/flight/OpenPilot/UAVObjects/inc/uavobjecttemplate.h @@ -31,9 +31,6 @@ #ifndef $(NAMEUC)_H #define $(NAMEUC)_H -#include -#include "uavobjectmanager.h" - // Object constants #define $(NAMEUC)_OBJID $(OBJID) #define $(NAMEUC)_NAME "$(NAME)" diff --git a/flight/OpenPilot/UAVObjects/uavobjectmanager.c b/flight/OpenPilot/UAVObjects/uavobjectmanager.c index 8e1dcad11..5247473cf 100644 --- a/flight/OpenPilot/UAVObjects/uavobjectmanager.c +++ b/flight/OpenPilot/UAVObjects/uavobjectmanager.c @@ -24,14 +24,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include // for malloc -#include // for strcmp -#include "uavobjectmanager.h" -#include "eventdispatcher.h" -#include "utlist.h" -#include "FreeRTOS.h" -#include "queue.h" -#include "semphr.h" +#include "openpilot.h" // Constants diff --git a/flight/OpenPilot/UAVObjects/uavobjectsinit.c b/flight/OpenPilot/UAVObjects/uavobjectsinit.c index f3d81266a..bb1b9bb94 100644 --- a/flight/OpenPilot/UAVObjects/uavobjectsinit.c +++ b/flight/OpenPilot/UAVObjects/uavobjectsinit.c @@ -24,7 +24,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "uavobjectsinit.h" +#include "openpilot.h" /** * Initialize all objects. diff --git a/flight/OpenPilot/UAVObjects/uavobjecttemplate.c b/flight/OpenPilot/UAVObjects/uavobjecttemplate.c index bfe180529..ac75c2491 100644 --- a/flight/OpenPilot/UAVObjects/uavobjecttemplate.c +++ b/flight/OpenPilot/UAVObjects/uavobjecttemplate.c @@ -30,9 +30,8 @@ #define $(METAOBJECT) -#include // for memcpy +#include "openpilot.h" #include "$(NAMELC).h" -#include "uavobjectmanager.h" diff --git a/flight/OpenPilot/UAVTalk/inc/uavtalk.h b/flight/OpenPilot/UAVTalk/inc/uavtalk.h index 78da81de2..4724ff82d 100644 --- a/flight/OpenPilot/UAVTalk/inc/uavtalk.h +++ b/flight/OpenPilot/UAVTalk/inc/uavtalk.h @@ -26,9 +26,6 @@ #ifndef UAVTALK_H #define UAVTALK_H -#include -#include "uavobjectmanager.h" - // Public constants #define UAVTALK_WAITFOREVER -1 #define UAVTALK_NOWAIT 0 diff --git a/flight/OpenPilot/UAVTalk/uavtalk.c b/flight/OpenPilot/UAVTalk/uavtalk.c index 18ed5c895..665b1b724 100644 --- a/flight/OpenPilot/UAVTalk/uavtalk.c +++ b/flight/OpenPilot/UAVTalk/uavtalk.c @@ -25,9 +25,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "uavtalk.h" -#include "FreeRTOS.h" -#include "semphr.h" +#include "openpilot.h" // Private constants #define TYPE_MASK 0xFC diff --git a/flight/PiOS/pios.h b/flight/PiOS/pios.h index f90d5c7c7..9b783369c 100644 --- a/flight/PiOS/pios.h +++ b/flight/PiOS/pios.h @@ -28,16 +28,15 @@ #ifndef PIOS_H #define PIOS_H - /* PIOS Compile Time Configuration */ #include "pios_config.h" #include "pios_board.h" /* FreeRTOS Includes */ -#include -#include -#include -#include +#include "FreeRTOS.h" +#include "task.h" +#include "queue.h" +#include "semphr.h" /* C Lib Includes */ #include