From a39f9480d934d0d0ce707ed42424f3c2d32f64fb Mon Sep 17 00:00:00 2001 From: Bruce Luckcuck Date: Tue, 4 Sep 2018 16:44:44 -0400 Subject: [PATCH] Fix USB HID parameter support in MSP_SET_RX_CONFIG msp message Workaround to make the firmware tolerant of missing Configurator support in versions 10.4.1 or less. Will still work properly when Configurator support is added. --- src/main/interface/msp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/interface/msp.c b/src/main/interface/msp.c index 65108aca1b..da2cb86932 100644 --- a/src/main/interface/msp.c +++ b/src/main/interface/msp.c @@ -2145,6 +2145,10 @@ static mspResult_e mspProcessInCommand(uint8_t cmdMSP, sbuf_t *src) sbufReadU8(src); sbufReadU8(src); #endif + } + if (sbufBytesRemaining(src) >= 1) { + // Added in MSP API 1.40 + // Kept separate from the section above to work around missing Configurator support in version < 10.4.2 #if defined(USE_USB_CDC_HID) usbDevConfigMutable()->type = sbufReadU8(src); #else