Validate RSSI instance to allow user defined RSSI source (issue #5842) (#5846)

This commit is contained in:
marbalon
2018-05-21 10:37:09 +02:00
committed by Bertrand Songis
parent 2f91eba85d
commit 1b3897a425
3 changed files with 23 additions and 2 deletions
+1 -1
View File
@@ -148,7 +148,7 @@ void sportProcessTelemetryPacket(const uint8_t * packet)
if (primId == DATA_FRAME) {
uint8_t instance = physicalId + 1;
if (id == RSSI_ID) {
if (id == RSSI_ID && isValidIdAndInstance(RSSI_ID, instance)) {
telemetryStreaming = TELEMETRY_TIMEOUT10ms; // reset counter only if valid packets are being detected
data = SPORT_DATA_U8(packet);
if (data == 0)