Merge pull request #7380 from etracer65/cli_msc_device_check

Check that flash device is selected for blackbox before msc CLI reboot
This commit is contained in:
Michael Keller 2019-01-15 00:14:59 +13:00 committed by GitHub
commit 06f1661d8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -22,6 +22,8 @@
#include "platform.h"
#include "blackbox/blackbox.h"
#include "drivers/sdcard.h"
#include "io/flashfs.h"
@ -32,10 +34,10 @@ bool mscCheckFilesystemReady(void)
{
return false
#if defined(USE_SDCARD)
|| sdcard_isFunctional()
|| (blackboxConfig()->device == BLACKBOX_DEVICE_SDCARD && sdcard_isFunctional())
#endif
#if defined(USE_FLASHFS)
|| flashfsGetSize() > 0
|| (blackboxConfig()->device == BLACKBOX_DEVICE_FLASH && flashfsGetSize() > 0)
#endif
;
}