Skip to content

Commit

Permalink
Add SPI ELRS Model Match ID (betaflight#13774)
Browse files Browse the repository at this point in the history
  • Loading branch information
haslinghuis authored Jul 26, 2024
1 parent 9730f9e commit 0819a56
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/main/msp/msp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 0819a56

Please sign in to comment.