mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-18 13:55:18 +03:00
Prevent calls to presistent object functions for unsupported MCU
Fixes for #8619
This commit is contained in:
parent
924c40a50d
commit
e4c357a02b
3 changed files with 6 additions and 1 deletions
|
@ -443,7 +443,9 @@ void init(void)
|
||||||
if (bothButtonsHeld) {
|
if (bothButtonsHeld) {
|
||||||
if (--secondsRemaining == 0) {
|
if (--secondsRemaining == 0) {
|
||||||
resetEEPROM();
|
resetEEPROM();
|
||||||
|
#ifdef USE_PERSISTENT_OBJECTS
|
||||||
persistentObjectWrite(PERSISTENT_OBJECT_RESET_REASON, RESET_NONE);
|
persistentObjectWrite(PERSISTENT_OBJECT_RESET_REASON, RESET_NONE);
|
||||||
|
#endif
|
||||||
systemReset();
|
systemReset();
|
||||||
}
|
}
|
||||||
delay(1000);
|
delay(1000);
|
||||||
|
|
|
@ -254,7 +254,7 @@
|
||||||
#undef USE_USB_MSC
|
#undef USE_USB_MSC
|
||||||
#endif
|
#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
|
#undef USE_PERSISTENT_MSC_RTC
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,7 @@
|
||||||
#define USE_MCO
|
#define USE_MCO
|
||||||
#define USE_DMA_SPEC
|
#define USE_DMA_SPEC
|
||||||
#define USE_TIMER_MGMT
|
#define USE_TIMER_MGMT
|
||||||
|
#define USE_PERSISTENT_OBJECTS
|
||||||
// Re-enable this after 4.0 has been released, and remove the define from STM32F4DISCOVERY
|
// Re-enable this after 4.0 has been released, and remove the define from STM32F4DISCOVERY
|
||||||
//#define USE_SPI_TRANSACTION
|
//#define USE_SPI_TRANSACTION
|
||||||
|
|
||||||
|
@ -93,6 +94,7 @@
|
||||||
#define USE_MCO
|
#define USE_MCO
|
||||||
#define USE_DMA_SPEC
|
#define USE_DMA_SPEC
|
||||||
#define USE_TIMER_MGMT
|
#define USE_TIMER_MGMT
|
||||||
|
#define USE_PERSISTENT_OBJECTS
|
||||||
// Re-enable this after 4.0 has been released, and remove the define from STM32F4DISCOVERY
|
// Re-enable this after 4.0 has been released, and remove the define from STM32F4DISCOVERY
|
||||||
//#define USE_SPI_TRANSACTION
|
//#define USE_SPI_TRANSACTION
|
||||||
#endif // STM32F7
|
#endif // STM32F7
|
||||||
|
@ -106,6 +108,7 @@
|
||||||
#define USE_USB_CDC_HID
|
#define USE_USB_CDC_HID
|
||||||
#define USE_DMA_SPEC
|
#define USE_DMA_SPEC
|
||||||
#define USE_TIMER_MGMT
|
#define USE_TIMER_MGMT
|
||||||
|
#define USE_PERSISTENT_OBJECTS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(STM32F4) || defined(STM32F7) || defined(STM32H7)
|
#if defined(STM32F4) || defined(STM32F7) || defined(STM32H7)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue