1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 19:40:31 +03:00

Fixed hanging on 'defaults nosave' when RX_SERIAL is enabled. (#8946)

Fixed hanging on 'defaults nosave' when RX_SERIAL is enabled.
This commit is contained in:
Michael Keller 2019-09-26 00:29:15 +12:00 committed by GitHub
commit be4db4cfa4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 128 additions and 58 deletions

View file

@ -3335,8 +3335,13 @@ static void cliBeeper(char *cmdline)
#if defined(USE_RX_SPI) || defined (USE_SERIALRX_SRXL2)
void cliRxBind(char *cmdline){
UNUSED(cmdline);
if (featureIsEnabled(FEATURE_RX_SERIAL)) {
switch (rxConfig()->serialrx_provider) {
switch (rxRuntimeConfig.rxProvider) {
default:
cliPrint("Not supported.");
break;
case RX_PROVIDER_SERIAL:
switch (rxRuntimeConfig.serialrxProvider) {
default:
cliPrint("Not supported.");
break;
@ -3347,9 +3352,10 @@ void cliRxBind(char *cmdline){
break;
#endif
}
}
break;
#if defined(USE_RX_SPI)
else if (featureIsEnabled(FEATURE_RX_SPI)) {
case RX_PROVIDER_SPI:
switch (rxSpiConfig()->rx_spi_protocol) {
default:
cliPrint("Not supported.");
@ -3379,9 +3385,10 @@ void cliRxBind(char *cmdline){
break;
#endif
}
}
break;
#endif
}
}
#endif