From 5dd8a3eea2edc52d268236c1f8c0af1903575921 Mon Sep 17 00:00:00 2001 From: zedamota Date: Sun, 1 May 2011 20:10:27 +0100 Subject: [PATCH] Fix a silly mistake on the CC erase_flash compile flag. --- flight/CopterControl/Makefile | 4 +++- flight/CopterControl/System/coptercontrol.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/flight/CopterControl/Makefile b/flight/CopterControl/Makefile index 5c9342dfe..0c7a963eb 100644 --- a/flight/CopterControl/Makefile +++ b/flight/CopterControl/Makefile @@ -392,7 +392,9 @@ endif ifeq ($(USE_BOOTLOADER), YES) CDEFS += -DUSE_BOOTLOADER endif - +ifeq ($(ERASE_FLASH), YES) +CDEFS += -DERASE_FLASH +endif ifeq ($(USE_SPEKTRUM), YES) CDEFS += -DUSE_SPEKTRUM endif diff --git a/flight/CopterControl/System/coptercontrol.c b/flight/CopterControl/System/coptercontrol.c index f4fcc25e5..736834763 100644 --- a/flight/CopterControl/System/coptercontrol.c +++ b/flight/CopterControl/System/coptercontrol.c @@ -110,7 +110,7 @@ void OpenPilotInit() PIOS_Board_Init(); -#if ERASE_FLASH +#ifdef ERASE_FLASH PIOS_Flash_W25X_EraseChip(); #endif