diff --git a/src/main/fc/init.c b/src/main/fc/init.c index 0cf487cef0..30d0b8e00e 100644 --- a/src/main/fc/init.c +++ b/src/main/fc/init.c @@ -443,7 +443,9 @@ void init(void) if (bothButtonsHeld) { if (--secondsRemaining == 0) { resetEEPROM(); +#ifdef USE_PERSISTENT_OBJECTS persistentObjectWrite(PERSISTENT_OBJECT_RESET_REASON, RESET_NONE); +#endif systemReset(); } delay(1000); diff --git a/src/main/target/common_post.h b/src/main/target/common_post.h index d0b7026a40..67cb1839a2 100644 --- a/src/main/target/common_post.h +++ b/src/main/target/common_post.h @@ -254,7 +254,7 @@ #undef USE_USB_MSC #endif -#if (!defined(USE_FLASHFS) || !defined(USE_RTC_TIME) || !defined(USE_USB_MSC)) +#if (!defined(USE_FLASHFS) || !defined(USE_RTC_TIME) || !defined(USE_USB_MSC) || !defined(USE_PERSISTENT_OBJECTS)) #undef USE_PERSISTENT_MSC_RTC #endif diff --git a/src/main/target/common_pre.h b/src/main/target/common_pre.h index c70f8fa1b8..ae936e64f2 100644 --- a/src/main/target/common_pre.h +++ b/src/main/target/common_pre.h @@ -65,6 +65,7 @@ #define USE_MCO #define USE_DMA_SPEC #define USE_TIMER_MGMT +#define USE_PERSISTENT_OBJECTS // Re-enable this after 4.0 has been released, and remove the define from STM32F4DISCOVERY //#define USE_SPI_TRANSACTION @@ -93,6 +94,7 @@ #define USE_MCO #define USE_DMA_SPEC #define USE_TIMER_MGMT +#define USE_PERSISTENT_OBJECTS // Re-enable this after 4.0 has been released, and remove the define from STM32F4DISCOVERY //#define USE_SPI_TRANSACTION #endif // STM32F7 @@ -106,6 +108,7 @@ #define USE_USB_CDC_HID #define USE_DMA_SPEC #define USE_TIMER_MGMT +#define USE_PERSISTENT_OBJECTS #endif #if defined(STM32F4) || defined(STM32F7) || defined(STM32H7)