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:
parent
cb2356ba76
commit
15bef42fd2
2 changed files with 11 additions and 6 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue