Removed this as it prevents us from having many RX streaming in the same time
This commit is contained in:
@@ -159,7 +159,7 @@ void sportProcessTelemetryPacketWithoutCrc(uint8_t origin, const uint8_t * packe
|
||||
|
||||
if (primId == DATA_FRAME) {
|
||||
uint8_t instance = physicalId + (origin << 5);
|
||||
if (dataId == RSSI_ID && isValidIdAndInstance(RSSI_ID, instance)) {
|
||||
if (dataId == RSSI_ID) {
|
||||
telemetryStreaming = TELEMETRY_TIMEOUT10ms; // reset counter only if valid packets are being detected
|
||||
data = SPORT_DATA_U8(packet);
|
||||
if (data == 0)
|
||||
|
||||
@@ -479,25 +479,6 @@ int lastUsedTelemetryIndex()
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool isValidIdAndInstance(uint16_t id, uint8_t instance)
|
||||
{
|
||||
bool sensorFound = false;
|
||||
|
||||
for (int index=0; index<MAX_TELEMETRY_SENSORS; index++) {
|
||||
TelemetrySensor & telemetrySensor = g_model.telemetrySensors[index];
|
||||
if (telemetrySensor.type == TELEM_TYPE_CUSTOM && telemetrySensor.id == id) {
|
||||
sensorFound = true;
|
||||
if (telemetrySensor.instance == instance || g_model.ignoreSensorIds)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (sensorFound)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int setTelemetryValue(TelemetryProtocol protocol, uint16_t id, uint8_t subId, uint8_t instance, int32_t value, uint32_t unit, uint32_t prec)
|
||||
{
|
||||
bool available = false;
|
||||
|
||||
@@ -137,6 +137,5 @@ class TelemetryItem
|
||||
extern TelemetryItem telemetryItems[MAX_TELEMETRY_SENSORS];
|
||||
extern uint8_t allowNewSensors;
|
||||
bool isFaiForbidden(source_t idx);
|
||||
bool isValidIdAndInstance(uint16_t id, uint8_t instance);
|
||||
|
||||
#endif // _TELEMETRY_SENSORS_H_
|
||||
|
||||
Reference in New Issue
Block a user