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

Add SPI ELRS Model Match ID (#13774)

This commit is contained in:
Mark Haslinghuis 2024-07-26 08:05:29 +02:00 committed by GitHub
parent 9730f9ee16
commit 0819a56d55
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1644,6 +1644,12 @@ case MSP_NAME:
uint8_t emptyUid[6]; uint8_t emptyUid[6];
memset(emptyUid, 0, sizeof(emptyUid)); memset(emptyUid, 0, sizeof(emptyUid));
sbufWriteData(dst, &emptyUid, 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 #endif
break; break;
case MSP_FAILSAFE_CONFIG: case MSP_FAILSAFE_CONFIG:
@ -3792,6 +3798,14 @@ static mspResult_e mspProcessInCommand(mspDescriptor_t srcDesc, int16_t cmdMSP,
#else #else
uint8_t emptyUid[6]; uint8_t emptyUid[6];
sbufReadData(src, 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 #endif
} }
break; break;