diff --git a/flight/AHRS/inc/pios_config.h b/flight/AHRS/inc/pios_config.h index 64f3559a0..77ddf0f2f 100644 --- a/flight/AHRS/inc/pios_config.h +++ b/flight/AHRS/inc/pios_config.h @@ -41,5 +41,6 @@ #define PIOS_INCLUDE_GPIO #define PIOS_INCLUDE_EXTI #define PIOS_INCLUDE_BL_HELPER +#define PIOS_INCLUDE_IAP #endif /* PIOS_CONFIG_H */ diff --git a/flight/Bootloaders/AHRS/inc/pios_config.h b/flight/Bootloaders/AHRS/inc/pios_config.h index b24e0fc5b..82344e2ad 100644 --- a/flight/Bootloaders/AHRS/inc/pios_config.h +++ b/flight/Bootloaders/AHRS/inc/pios_config.h @@ -36,5 +36,6 @@ #define PIOS_INCLUDE_BL_HELPER #define PIOS_INCLUDE_BL_HELPER_WRITE_SUPPORT #define PIOS_INCLUDE_GPIO +#define PIOS_INCLUDE_IAP #endif /* PIOS_CONFIG_H */ diff --git a/flight/Bootloaders/CopterControl/inc/pios_config.h b/flight/Bootloaders/CopterControl/inc/pios_config.h index 864ed4665..3eb2c281a 100644 --- a/flight/Bootloaders/CopterControl/inc/pios_config.h +++ b/flight/Bootloaders/CopterControl/inc/pios_config.h @@ -41,6 +41,7 @@ #define PIOS_INCLUDE_USB_HID #define PIOS_INCLUDE_COM_MSG #define PIOS_INCLUDE_GPIO +#define PIOS_INCLUDE_IAP #define PIOS_NO_GPS #endif /* PIOS_CONFIG_H */ diff --git a/flight/Bootloaders/OpenPilot/inc/pios_config.h b/flight/Bootloaders/OpenPilot/inc/pios_config.h index cf8981339..932c1a913 100644 --- a/flight/Bootloaders/OpenPilot/inc/pios_config.h +++ b/flight/Bootloaders/OpenPilot/inc/pios_config.h @@ -44,6 +44,7 @@ #define PIOS_INCLUDE_COM #define PIOS_INCLUDE_COM_MSG #define PIOS_INCLUDE_GPIO +#define PIOS_INCLUDE_IAP //#define DEBUG_SSP /* Defaults for Logging */ diff --git a/flight/Bootloaders/PipXtreme/inc/pios_config.h b/flight/Bootloaders/PipXtreme/inc/pios_config.h index cec926057..1b1b9c2bc 100644 --- a/flight/Bootloaders/PipXtreme/inc/pios_config.h +++ b/flight/Bootloaders/PipXtreme/inc/pios_config.h @@ -40,6 +40,7 @@ #define PIOS_INCLUDE_USB_HID #define PIOS_INCLUDE_COM_MSG #define PIOS_INCLUDE_GPIO +#define PIOS_INCLUDE_IAP /* Defaults for Logging */ #define LOG_FILENAME "PIOS.LOG" diff --git a/flight/CopterControl/System/inc/pios_config.h b/flight/CopterControl/System/inc/pios_config.h index 54c5b3b22..6ca38bf2c 100644 --- a/flight/CopterControl/System/inc/pios_config.h +++ b/flight/CopterControl/System/inc/pios_config.h @@ -42,6 +42,7 @@ #endif #define PIOS_INCLUDE_IRQ #define PIOS_INCLUDE_LED +#define PIOS_INCLUDE_IAP #define PIOS_INCLUDE_RCVR diff --git a/flight/INS/inc/pios_config.h b/flight/INS/inc/pios_config.h index ae6561236..a13394179 100644 --- a/flight/INS/inc/pios_config.h +++ b/flight/INS/inc/pios_config.h @@ -51,6 +51,7 @@ #define PIOS_INCLUDE_IMU3000 #define PIOS_INCLUDE_GPIO #define PIOS_INCLUDE_EXTI +#define PIOS_INCLUDE_IAP #define PIOS_INCLUDE_BMA180 diff --git a/flight/Modules/System/systemmod.c b/flight/Modules/System/systemmod.c index bb3496b0f..29fb99791 100644 --- a/flight/Modules/System/systemmod.c +++ b/flight/Modules/System/systemmod.c @@ -48,8 +48,6 @@ #include "taskinfo.h" #include "watchdogstatus.h" #include "taskmonitor.h" -#include "pios_iap.h" - // Private constants #define SYSTEM_UPDATE_PERIOD_MS 1000 @@ -148,8 +146,10 @@ static void systemTask(void *parameters) PIOS_SYS_Reset(); } +#if defined(PIOS_INCLUDE_IAP) /* Record a successful boot */ PIOS_IAP_WriteBootCount(0); +#endif // Initialize vars idleCounter = 0; diff --git a/flight/OpenPilot/System/inc/pios_config.h b/flight/OpenPilot/System/inc/pios_config.h index ce0484a8d..f5227019f 100644 --- a/flight/OpenPilot/System/inc/pios_config.h +++ b/flight/OpenPilot/System/inc/pios_config.h @@ -41,6 +41,7 @@ #define PIOS_INCLUDE_I2C #define PIOS_INCLUDE_IRQ #define PIOS_INCLUDE_LED +#define PIOS_INCLUDE_IAP #define PIOS_INCLUDE_RCVR diff --git a/flight/PiOS/pios.h b/flight/PiOS/pios.h index 58d869517..4429c477a 100644 --- a/flight/PiOS/pios.h +++ b/flight/PiOS/pios.h @@ -112,7 +112,10 @@ #if defined(PIOS_INCLUDE_IMU3000) #include #endif + +#if defined(PIOS_INCLUDE_IAP) #include +#endif #if defined(PIOS_INCLUDE_ADXL345) #include