Skip to content

Commit

Permalink
Add modelId to MSP_PILOT
Browse files Browse the repository at this point in the history
  • Loading branch information
pmattila committed Sep 2, 2024
1 parent c05a133 commit 52237ee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/msp/msp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,7 @@ static bool mspProcessOutCommand(int16_t cmdMSP, sbuf_t *dst)
for (int i = 0; i < nameLen; i++) {
sbufWriteU8(dst, pilotConfig()->name[i]);
}
sbufWriteU8(dst, pilotConfig()->modelId);
}
break;

Expand Down Expand Up @@ -3201,6 +3202,9 @@ static mspResult_e mspProcessInCommand(mspDescriptor_t srcDesc, int16_t cmdMSP,
for (unsigned int i = 0; i < MIN(MAX_NAME_LENGTH, dataSize); i++) {
pilotConfigMutable()->name[i] = sbufReadU8(src);
}
if (sbufBytesRemaining(src) >= 1) {
pilotConfigMutable()->modelId = sbufReadU8(src);
}
#ifdef USE_OSD
osdAnalyzeActiveElements();
#endif
Expand Down

0 comments on commit 52237ee

Please sign in to comment.