diff --git a/makefiles/config_px4fmu_default.mk b/makefiles/config_px4fmu_default.mk index 0767f71447..6fd7da4614 100644 --- a/makefiles/config_px4fmu_default.mk +++ b/makefiles/config_px4fmu_default.mk @@ -56,6 +56,13 @@ MODULES += modules/attitude_estimator_ekf MODULES += modules/position_estimator_mc MODULES += modules/att_pos_estimator_ekf +# +# Vehicle Control +# +MODULES += modules/fixedwing_backside +MODULES += modules/fixedwing_att_control +MODULES += modules/fixedwing_pos_control + # # Logging # diff --git a/apps/fixedwing_att_control/fixedwing_att_control_att.c b/src/modules/fixedwing_att_control/fixedwing_att_control_att.c similarity index 99% rename from apps/fixedwing_att_control/fixedwing_att_control_att.c rename to src/modules/fixedwing_att_control/fixedwing_att_control_att.c index b012448a23..769b8b0a8d 100644 --- a/apps/fixedwing_att_control/fixedwing_att_control_att.c +++ b/src/modules/fixedwing_att_control/fixedwing_att_control_att.c @@ -35,7 +35,6 @@ * @file fixedwing_att_control_rate.c * Implementation of a fixed wing attitude controller. */ -#include #include #include @@ -59,7 +58,7 @@ #include #include - +#include "fixedwing_att_control_att.h" struct fw_att_control_params { diff --git a/apps/fixedwing_att_control/fixedwing_att_control_att.h b/src/modules/fixedwing_att_control/fixedwing_att_control_att.h similarity index 100% rename from apps/fixedwing_att_control/fixedwing_att_control_att.h rename to src/modules/fixedwing_att_control/fixedwing_att_control_att.h diff --git a/apps/fixedwing_att_control/fixedwing_att_control_main.c b/src/modules/fixedwing_att_control/fixedwing_att_control_main.c similarity index 99% rename from apps/fixedwing_att_control/fixedwing_att_control_main.c rename to src/modules/fixedwing_att_control/fixedwing_att_control_main.c index aa9db6d528..58477632b2 100644 --- a/apps/fixedwing_att_control/fixedwing_att_control_main.c +++ b/src/modules/fixedwing_att_control/fixedwing_att_control_main.c @@ -65,8 +65,9 @@ #include #include #include -#include -#include + +#include "fixedwing_att_control_rate.h" +#include "fixedwing_att_control_att.h" /* Prototypes */ /** diff --git a/apps/fixedwing_att_control/fixedwing_att_control_rate.c b/src/modules/fixedwing_att_control/fixedwing_att_control_rate.c similarity index 99% rename from apps/fixedwing_att_control/fixedwing_att_control_rate.c rename to src/modules/fixedwing_att_control/fixedwing_att_control_rate.c index ba5b593e28..4eccc118cb 100644 --- a/apps/fixedwing_att_control/fixedwing_att_control_rate.c +++ b/src/modules/fixedwing_att_control/fixedwing_att_control_rate.c @@ -33,11 +33,11 @@ ****************************************************************************/ /** * @file fixedwing_att_control_rate.c + * @author Thomas Gubler + * * Implementation of a fixed wing attitude controller. * - * @author Thomas Gubler */ -#include #include #include @@ -61,6 +61,8 @@ #include #include +#include "fixedwing_att_control_rate.h" + /* * Controller parameters, accessible via MAVLink * diff --git a/apps/fixedwing_att_control/fixedwing_att_control_rate.h b/src/modules/fixedwing_att_control/fixedwing_att_control_rate.h similarity index 100% rename from apps/fixedwing_att_control/fixedwing_att_control_rate.h rename to src/modules/fixedwing_att_control/fixedwing_att_control_rate.h diff --git a/apps/fixedwing_att_control/Makefile b/src/modules/fixedwing_att_control/module.mk similarity index 86% rename from apps/fixedwing_att_control/Makefile rename to src/modules/fixedwing_att_control/module.mk index 01465fa9ec..fd1a8724a5 100644 --- a/apps/fixedwing_att_control/Makefile +++ b/src/modules/fixedwing_att_control/module.mk @@ -1,6 +1,6 @@ ############################################################################ # -# Copyright (C) 2012 PX4 Development Team. All rights reserved. +# Copyright (c) 2012, 2013 PX4 Development Team. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -32,14 +32,11 @@ ############################################################################ # -# Fixedwing Control application +# Fixedwing Attitude Control application # -APPNAME = fixedwing_att_control -PRIORITY = SCHED_PRIORITY_MAX - 30 -STACKSIZE = 2048 - -INCLUDES = $(TOPDIR)/../mavlink/include/mavlink - -include $(APPDIR)/mk/app.mk +MODULE_COMMAND = fixedwing_att_control +SRCS = fixedwing_att_control_main.c \ + fixedwing_att_control_att.c \ + fixedwing_att_control_rate.c diff --git a/apps/examples/control_demo/control_demo.cpp b/src/modules/fixedwing_backside/fixedwing_backside_main.cpp similarity index 92% rename from apps/examples/control_demo/control_demo.cpp rename to src/modules/fixedwing_backside/fixedwing_backside_main.cpp index e609f2f4bd..e21990c929 100644 --- a/apps/examples/control_demo/control_demo.cpp +++ b/src/modules/fixedwing_backside/fixedwing_backside_main.cpp @@ -1,7 +1,7 @@ /**************************************************************************** * - * Copyright (C) 2012 PX4 Development Team. All rights reserved. - * Author: @author Example User + * Copyright (c) 2012, 2013 PX4 Development Team. All rights reserved. + * Author: James Goppert * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -33,8 +33,10 @@ ****************************************************************************/ /** - * @file control_demo.cpp - * Demonstration of control library + * @file fixedwing_backside_main.cpp + * @author James Goppert + * + * Fixedwing backside controller using control library */ #include @@ -55,7 +57,7 @@ static int deamon_task; /**< Handle of deamon task / thread */ /** * Deamon management function. */ -extern "C" __EXPORT int control_demo_main(int argc, char *argv[]); +extern "C" __EXPORT int fixedwing_backside_main(int argc, char *argv[]); /** * Mainloop of deamon. @@ -90,7 +92,7 @@ usage(const char *reason) * The actual stack size should be set in the call * to task_create(). */ -int control_demo_main(int argc, char *argv[]) +int fixedwing_backside_main(int argc, char *argv[]) { if (argc < 1) diff --git a/apps/examples/control_demo/Makefile b/src/modules/fixedwing_backside/module.mk similarity index 89% rename from apps/examples/control_demo/Makefile rename to src/modules/fixedwing_backside/module.mk index 6e40e645f8..a9233288b0 100644 --- a/apps/examples/control_demo/Makefile +++ b/src/modules/fixedwing_backside/module.mk @@ -1,6 +1,6 @@ ############################################################################ # -# Copyright (C) 2012 PX4 Development Team. All rights reserved. +# Copyright (c) 2012, 2013 PX4 Development Team. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -32,11 +32,9 @@ ############################################################################ # -# Basic example application +# Fixedwing backside controller # -APPNAME = control_demo -PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +MODULE_COMMAND = fixedwing_backside -include $(APPDIR)/mk/app.mk +SRCS = fixedwing_backside_main.cpp diff --git a/apps/examples/control_demo/params.c b/src/modules/fixedwing_backside/params.c similarity index 100% rename from apps/examples/control_demo/params.c rename to src/modules/fixedwing_backside/params.c diff --git a/apps/fixedwing_pos_control/fixedwing_pos_control_main.c b/src/modules/fixedwing_pos_control/fixedwing_pos_control_main.c similarity index 100% rename from apps/fixedwing_pos_control/fixedwing_pos_control_main.c rename to src/modules/fixedwing_pos_control/fixedwing_pos_control_main.c diff --git a/apps/fixedwing_pos_control/Makefile b/src/modules/fixedwing_pos_control/module.mk similarity index 86% rename from apps/fixedwing_pos_control/Makefile rename to src/modules/fixedwing_pos_control/module.mk index bce391f499..b976377e93 100644 --- a/apps/fixedwing_pos_control/Makefile +++ b/src/modules/fixedwing_pos_control/module.mk @@ -1,6 +1,6 @@ ############################################################################ # -# Copyright (C) 2012 PX4 Development Team. All rights reserved. +# Copyright (c) 2012, 2013 PX4 Development Team. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -32,14 +32,9 @@ ############################################################################ # -# Fixedwing Control application +# Fixedwing PositionControl application # -APPNAME = fixedwing_pos_control -PRIORITY = SCHED_PRIORITY_MAX - 30 -STACKSIZE = 2048 - -INCLUDES = $(TOPDIR)/../mavlink/include/mavlink - -include $(APPDIR)/mk/app.mk +MODULE_COMMAND = fixedwing_pos_control +SRCS = fixedwing_pos_control_main.c