1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

Prevent calls to presistent object functions for unsupported MCU (#8633)

Prevent calls to presistent object functions for unsupported MCU
This commit is contained in:
Michael Keller 2019-08-01 23:24:41 +12:00 committed by mikeller
parent 037704bc75
commit 839661b20c
4 changed files with 7 additions and 2 deletions

View file

@ -266,6 +266,7 @@ bool rtcSetDateTime(dateTime_t *dt)
return rtcSet(&t);
}
#if defined(USE_PERSISTENT_OBJECTS)
void rtcPersistWrite(int16_t offsetMinutes)
{
rtcTime_t workTime;
@ -292,5 +293,5 @@ bool rtcPersistRead(rtcTime_t *t)
return false;
}
}
#endif
#endif // USE_RTC_TIME

View file

@ -341,7 +341,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);

View file

@ -239,7 +239,7 @@
#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
#endif

View file

@ -64,6 +64,7 @@
#define USE_PERSISTENT_MSC_RTC
#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
@ -91,6 +92,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