-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
- Add RSSI - Allow extended versions of future MSP2_COMMON_SET_MSP_RC_LINK_STATS and MSP2_COMMON_SET_MSP_RC_INFO still work with older (from now) INAV versions. Except for the new data.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2916,11 +2916,11 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src) | |
|
||
#ifdef USE_RX_MSP | ||
case MSP2_COMMON_SET_MSP_RC_LINK_STATS: | ||
if (dataSize == 7) { | ||
if (dataSize >= 7) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong. |
||
uint8_t sublinkID = sbufReadU8(src); // Sublink ID | ||
sbufReadU8(src); // Valid link (Failsafe backup) | ||
if (sublinkID == 1) { | ||
sbufReadU8(src); // RSSI % | ||
setRSSIFromMSP(sbufReadU8(src)); // RSSI % | ||
rxLinkStatistics.uplinkRSSI = -sbufReadU16(src); | ||
rxLinkStatistics.downlinkLQ = sbufReadU8(src); | ||
rxLinkStatistics.uplinkLQ = sbufReadU8(src); | ||
|
@@ -2931,7 +2931,7 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src) | |
break; | ||
|
||
case MSP2_COMMON_SET_MSP_RC_INFO: | ||
if (dataSize == 15) { | ||
if (dataSize >= 15) { | ||
This comment has been minimized.
Sorry, something went wrong.
olliw42
|
||
uint8_t sublinkID = sbufReadU8(src); | ||
|
||
if (sublinkID == 1) { | ||
|
I think th dataSize is still incorrect
this one will work but the message as defined by the reads to sbufReadUxx reads 8 bytes