mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 04:45:24 +03:00
Fixed USB MSC activation over MSP. Also fixed fallthrough in case of invalid reboot type.
This commit is contained in:
parent
d63878aebc
commit
858c55af74
2 changed files with 4 additions and 7 deletions
|
@ -268,7 +268,7 @@ static void mspRebootFn(serialPort_t *serialPort)
|
|||
#endif
|
||||
default:
|
||||
|
||||
break;
|
||||
return;
|
||||
}
|
||||
|
||||
// control should never return here.
|
||||
|
@ -1547,7 +1547,7 @@ static mspResult_e mspFcProcessOutCommandWithArg(uint8_t cmdMSP, sbuf_t *src, sb
|
|||
|
||||
if (rebootMode >= MSP_REBOOT_COUNT
|
||||
#if !defined(USE_USB_MSC)
|
||||
|| rebootMode == MSP_REBOOT_MSC
|
||||
|| rebootMode == MSP_REBOOT_MSC || rebootMode == MSP_REBOOT_MSC_UTC
|
||||
#endif
|
||||
) {
|
||||
return MSP_RESULT_ERROR;
|
||||
|
|
|
@ -151,12 +151,13 @@
|
|||
#undef USE_ADC_INTERNAL
|
||||
#endif
|
||||
|
||||
#if (!defined(USE_SDCARD) && !defined(USE_FLASHFS)) || !(defined(STM32F4) || defined(STM32F7))
|
||||
#if (!defined(USE_SDCARD) && !defined(USE_FLASHFS)) || !defined(USE_BLACKBOX)
|
||||
#undef USE_USB_MSC
|
||||
#endif
|
||||
|
||||
#if !defined(USE_VCP)
|
||||
#undef USE_USB_CDC_HID
|
||||
#undef USE_USB_MSC
|
||||
#endif
|
||||
|
||||
#if defined(USE_USB_CDC_HID) || defined(USE_USB_MSC)
|
||||
|
@ -226,10 +227,6 @@
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef USE_BLACKBOX
|
||||
#undef USE_USB_MSC
|
||||
#endif
|
||||
|
||||
#if (!defined(USE_FLASHFS) || !defined(USE_RTC_TIME) || !defined(USE_USB_MSC))
|
||||
#undef USE_PERSISTENT_MSC_RTC
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue