From 9169ceb3f4884a863d527c6b8e7ea237b41a48ce Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Fri, 26 Apr 2013 11:10:39 +0200 Subject: [PATCH] Cut over commander app to new build system --- apps/commander/.context | 0 makefiles/config_px4fmu_default.mk | 6 +++++- makefiles/config_px4fmuv2_default.mk | 5 +++++ .../modules}/commander/calibration_routines.c | 0 .../modules}/commander/calibration_routines.h | 0 {apps => src/modules}/commander/commander.c | 0 {apps => src/modules}/commander/commander.h | 0 .../Makefile => src/modules/commander/module.mk | 16 ++++++---------- .../modules}/commander/state_machine_helper.c | 0 .../modules}/commander/state_machine_helper.h | 0 10 files changed, 16 insertions(+), 11 deletions(-) delete mode 100644 apps/commander/.context rename {apps => src/modules}/commander/calibration_routines.c (100%) rename {apps => src/modules}/commander/calibration_routines.h (100%) rename {apps => src/modules}/commander/commander.c (100%) rename {apps => src/modules}/commander/commander.h (100%) rename apps/commander/Makefile => src/modules/commander/module.mk (86%) rename {apps => src/modules}/commander/state_machine_helper.c (100%) rename {apps => src/modules}/commander/state_machine_helper.h (100%) diff --git a/apps/commander/.context b/apps/commander/.context deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/makefiles/config_px4fmu_default.mk b/makefiles/config_px4fmu_default.mk index 1302d15821..6c43377e39 100644 --- a/makefiles/config_px4fmu_default.mk +++ b/makefiles/config_px4fmu_default.mk @@ -17,6 +17,11 @@ MODULES += drivers/l3gd20 MODULES += drivers/ardrone_interface MODULES += systemcmds/eeprom +# +# General system control +# +MODULES += modules/commander + # # Estimation modules (EKF / other filters) # @@ -41,7 +46,6 @@ BUILTIN_COMMANDS := \ $(call _B, blinkm, , 2048, blinkm_main ) \ $(call _B, bma180, , 2048, bma180_main ) \ $(call _B, boardinfo, , 2048, boardinfo_main ) \ - $(call _B, commander, SCHED_PRIORITY_MAX-30, 2048, commander_main ) \ $(call _B, control_demo, , 2048, control_demo_main ) \ $(call _B, delay_test, , 2048, delay_test_main ) \ $(call _B, fixedwing_att_control, SCHED_PRIORITY_MAX-30, 2048, fixedwing_att_control_main ) \ diff --git a/makefiles/config_px4fmuv2_default.mk b/makefiles/config_px4fmuv2_default.mk index 659b9c95be..fd69baa29a 100644 --- a/makefiles/config_px4fmuv2_default.mk +++ b/makefiles/config_px4fmuv2_default.mk @@ -17,6 +17,11 @@ MODULES += drivers/px4fmu MODULES += drivers/rgbled MODULES += systemcmds/ramtron +# +# General system control +# +MODULES += modules/commander + # # Estimation modules (EKF / other filters) # diff --git a/apps/commander/calibration_routines.c b/src/modules/commander/calibration_routines.c similarity index 100% rename from apps/commander/calibration_routines.c rename to src/modules/commander/calibration_routines.c diff --git a/apps/commander/calibration_routines.h b/src/modules/commander/calibration_routines.h similarity index 100% rename from apps/commander/calibration_routines.h rename to src/modules/commander/calibration_routines.h diff --git a/apps/commander/commander.c b/src/modules/commander/commander.c similarity index 100% rename from apps/commander/commander.c rename to src/modules/commander/commander.c diff --git a/apps/commander/commander.h b/src/modules/commander/commander.h similarity index 100% rename from apps/commander/commander.h rename to src/modules/commander/commander.h diff --git a/apps/commander/Makefile b/src/modules/commander/module.mk similarity index 86% rename from apps/commander/Makefile rename to src/modules/commander/module.mk index d12697274b..b90da8289f 100644 --- a/apps/commander/Makefile +++ b/src/modules/commander/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,10 @@ ############################################################################ # -# Commander application +# Main system state machine # -APPNAME = commander -PRIORITY = SCHED_PRIORITY_MAX - 30 -STACKSIZE = 2048 - -INCLUDES = $(TOPDIR)/../mavlink/include/mavlink - -include $(APPDIR)/mk/app.mk - +MODULE_COMMAND = commander +SRCS = commander.c \ + state_machine_helper.c \ + calibration_routines.c diff --git a/apps/commander/state_machine_helper.c b/src/modules/commander/state_machine_helper.c similarity index 100% rename from apps/commander/state_machine_helper.c rename to src/modules/commander/state_machine_helper.c diff --git a/apps/commander/state_machine_helper.h b/src/modules/commander/state_machine_helper.h similarity index 100% rename from apps/commander/state_machine_helper.h rename to src/modules/commander/state_machine_helper.h