1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-20 10:54:14 +01:00

Makefile: use upper case for MODULE_MODULENAME_BUILTIN macros

+review OPReview-422
This commit is contained in:
Oleg Semyonov 2013-03-25 16:02:16 +02:00
parent 17600ed09f
commit 9335a50b18
10 changed files with 14 additions and 12 deletions

View File

@ -89,7 +89,7 @@ int32_t AirspeedStart()
*/
int32_t AirspeedInitialize()
{
#ifdef MODULE_Airspeed_BUILTIN
#ifdef MODULE_AIRSPEED_BUILTIN
airspeedEnabled = true;
#else

View File

@ -92,7 +92,7 @@ int32_t AltitudeStart()
*/
int32_t AltitudeInitialize()
{
#ifdef MODULE_Altitude_BUILTIN
#ifdef MODULE_ALTITUDE_BUILTIN
altitudeEnabled = 1;
#else
HwSettingsInitialize();

View File

@ -82,7 +82,7 @@ static void update_stabilization_settings();
int32_t AutotuneInitialize(void)
{
// Create a queue, connect to manual control command and flightstatus
#ifdef MODULE_Autotune_BUILTIN
#ifdef MODULE_AUTOTUNE_BUILTIN
autotuneEnabled = true;
#else
HwSettingsInitialize();

View File

@ -78,7 +78,7 @@ int32_t BatteryInitialize(void)
{
#ifdef MODULE_Battery_BUILTIN
#ifdef MODULE_BATTERY_BUILTIN
batteryEnabled = true;
#else
uint8_t optionalModules[HWSETTINGS_OPTIONALMODULES_NUMELEM];

View File

@ -94,7 +94,7 @@ int32_t CameraStabInitialize(void)
{
bool cameraStabEnabled;
#ifdef MODULE_CameraStab_BUILTIN
#ifdef MODULE_CAMERASTAB_BUILTIN
cameraStabEnabled = true;
#else
uint8_t optionalModules[HWSETTINGS_OPTIONALMODULES_NUMELEM];

View File

@ -94,7 +94,7 @@ static int32_t comUsbBridgeInitialize(void)
usart_port = PIOS_COM_BRIDGE;
vcp_port = PIOS_COM_VCP;
#ifdef MODULE_ComUsbBridge_BUILTIN
#ifdef MODULE_COMUSBBRIDGE_BUILTIN
bridge_enabled = true;
#else
HwSettingsInitialize();

View File

@ -87,7 +87,7 @@ int32_t MagBaroStart()
*/
int32_t MagBaroInitialize()
{
#ifdef MODULE_MagBaro_BUILTIN
#ifdef MODULE_MAGBARO_BUILTIN
magbaroEnabled = 1;
#else
HwSettingsInitialize();

View File

@ -40,7 +40,7 @@ static uint8_t active_fault;
static int32_t fault_initialize(void)
{
#ifdef MODULE_Fault_BUILTIN
#ifdef MODULE_FAULT_BUILTIN
module_enabled = true;
#else
HwSettingsInitialize();

View File

@ -75,7 +75,7 @@ struct overosync *overosync;
int32_t OveroSyncInitialize(void)
{
#ifdef MODULE_OveroSync_BUILTIN
#ifdef MODULE_OVEROSYNC_BUILTIN
overoEnabled = true;
#else

View File

@ -104,6 +104,11 @@ SRC += $(MATHLIB)/pid.c
SRC += $(foreach mod, $(MODULES), $(wildcard $(OPMODULEDIR)/$(mod)/*.c))
SRC += $(foreach mod, $(OPTMODULES), $(wildcard $(OPMODULEDIR)/$(mod)/*.c))
# Declare all non-optional modules as built-in to force inclusion.
# Built-in modules are always enabled and cannot be disabled.
MODULES_BUILTIN := $(foreach mod, $(notdir $(MODULES)), -DMODULE_$(shell $(ECHO) $(mod) | tr '[:lower:]' '[:upper:]')_BUILTIN)
CDEFS += $(MODULES_BUILTIN)
# List C source files here which must be compiled in ARM-Mode (no -mthumb).
# Use file-extension c for "c-only"-files
SRCARM +=
@ -162,9 +167,6 @@ EXTRA_LIBS += m
# Compiler flags
CFLAGS +=
# Declare all non-optional modules as built-in to force inclusion
CDEFS += $(foreach mod, $(notdir $(MODULES)), -DMODULE_$(mod)_BUILTIN)
# Set linker-script name depending on selected submodel name
ifeq ($(MCU),cortex-m3)
LDFLAGS += -T$(LINKER_SCRIPTS_PATH)/link_$(BOARD)_memory.ld