Skip to content

Commit

Permalink
Fix typecast in MSP messages
Browse files Browse the repository at this point in the history
  • Loading branch information
pmattila committed Nov 15, 2023
1 parent d6c91be commit dc1cd41
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/msp/msp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1257,19 +1257,19 @@ static bool mspProcessOutCommand(int16_t cmdMSP, sbuf_t *dst)

case MSP_RC:
for (int i = 0; i < rxRuntimeState.channelCount; i++) {
sbufWriteU16(dst, rcInput[i]);
sbufWriteU16(dst, (int16_t)rcInput[i]);
}
break;

case MSP_RC_COMMAND:
for (int i = 0; i < CONTROL_CHANNEL_COUNT; i++) {
sbufWriteU16(dst, rcCommand[i]);
sbufWriteU16(dst, (int16_t)rcCommand[i]);
}
break;

case MSP_RX_CHANNELS:
for (int i = 0; i < rxRuntimeState.channelCount; i++) {
sbufWriteU16(dst, rcRawChannel[i]);
sbufWriteU16(dst, (int16_t)rcRawChannel[i]);
}
break;

Expand Down

0 comments on commit dc1cd41

Please sign in to comment.