1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 01:05:27 +03:00

Made flash erasing compile conditional on USE_FLASHFS.

This commit is contained in:
mikeller 2017-02-13 00:25:42 +13:00 committed by Michael Keller
parent cb2356ba76
commit 15bef42fd2
2 changed files with 11 additions and 6 deletions

View file

@ -614,14 +614,13 @@ bool blackboxDeviceOpen(void)
/**
* Erase all blackbox logs
*/
#ifdef USE_FLASHFS
void blackboxEraseAll(void)
{
switch (blackboxConfig()->device) {
#ifdef USE_FLASHFS
case BLACKBOX_DEVICE_FLASH:
flashfsEraseCompletely();
break;
#endif
default:
//not supported
break;
@ -635,11 +634,9 @@ void blackboxEraseAll(void)
bool isBlackboxErased(void)
{
switch (blackboxConfig()->device) {
#ifdef USE_FLASHFS
case BLACKBOX_DEVICE_FLASH:
return flashfsIsReady();
break;
#endif
default:
//not supported
return true;
@ -647,6 +644,7 @@ bool isBlackboxErased(void)
}
}
#endif
/**
* Close the Blackbox logging device immediately without attempting to flush any remaining data.