From 0819a56d55bda2290423c4b02868d6b6faa10352 Mon Sep 17 00:00:00 2001 From: Mark Haslinghuis Date: Fri, 26 Jul 2024 08:05:29 +0200 Subject: [PATCH] Add SPI ELRS Model Match ID (#13774) --- src/main/msp/msp.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/msp/msp.c b/src/main/msp/msp.c index 2204758a55..6a7b5155ea 100644 --- a/src/main/msp/msp.c +++ b/src/main/msp/msp.c @@ -1644,6 +1644,12 @@ case MSP_NAME: uint8_t emptyUid[6]; memset(emptyUid, 0, sizeof(emptyUid)); sbufWriteData(dst, &emptyUid, sizeof(emptyUid)); +#endif + // Added in MSP API 1.47 +#ifdef USE_RX_EXPRESSLRS + sbufWriteU8(dst, rxExpressLrsSpiConfig()->modelId); +#else + sbufWriteU8(dst, 0); #endif break; case MSP_FAILSAFE_CONFIG: @@ -3792,6 +3798,14 @@ static mspResult_e mspProcessInCommand(mspDescriptor_t srcDesc, int16_t cmdMSP, #else uint8_t emptyUid[6]; sbufReadData(src, emptyUid, 6); +#endif + } + if (sbufBytesRemaining(src) >= 1) { +#ifdef USE_RX_EXPRESSLRS + // Added in MSP API 1.47 + rxExpressLrsSpiConfigMutable()->modelId = sbufReadU8(src); +#else + sbufReadU8(src); #endif } break;