Fix for rssiSource
This commit is contained in:
@@ -240,19 +240,20 @@ void menuModelTelemetryFrsky(event_t event)
|
||||
|
||||
case ITEM_TELEMETRY_RSSI_LABEL:
|
||||
#if defined(MULTIMODULE)
|
||||
if (telemetryProtocol == PROTOCOL_TELEMETRY_MULTIMODULE &&
|
||||
g_model.moduleData[EXTERNAL_MODULE].getMultiProtocol(false) == MM_RF_PROTO_FS_AFHDS2A)
|
||||
if (telemetryProtocol == PROTOCOL_TELEMETRY_MULTIMODULE && g_model.moduleData[EXTERNAL_MODULE].getMultiProtocol(false) == MM_RF_PROTO_FS_AFHDS2A)
|
||||
lcdDrawTextAlignedLeft(y, "RSNR");
|
||||
else
|
||||
#endif
|
||||
lcdDrawTextAlignedLeft(y, "RSSI");
|
||||
#else
|
||||
lcdDrawTextAlignedLeft(y, "RSSI");
|
||||
#endif
|
||||
break;
|
||||
|
||||
case ITEM_TELEMETRY_RSSI_SOURCE: {
|
||||
lcdDrawTextAlignedLeft(y, STR_SOURCE);
|
||||
drawSource(TELEM_COL2, y, g_model.rssiSource ? MIXSRC_FIRST_TELEM + 3 * (g_model.rssiSource - 1) : 0, attr);
|
||||
if (g_model.rssiSource) {
|
||||
TelemetrySensor * sensor = &g_model.telemetrySensors[MIXSRC_FIRST_TELEM + 3 * (g_model.rssiSource - 1)];
|
||||
TelemetrySensor * sensor = &g_model.telemetrySensors[g_model.rssiSource - 1];
|
||||
lcdDrawText(lcdNextPos, y, " ", attr);
|
||||
drawReceiverName(lcdNextPos, y, sensor->frskyInstance.rxIndex >> 2, sensor->frskyInstance.rxIndex & 0x03, attr);
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ void sportProcessTelemetryPacketWithoutCrc(uint8_t origin, const uint8_t * packe
|
||||
telemetryStreaming = TELEMETRY_TIMEOUT10ms; // reset counter only if valid packets are being detected
|
||||
data = SPORT_DATA_U8(packet);
|
||||
if (g_model.rssiSource) {
|
||||
TelemetrySensor * sensor = & g_model.telemetrySensors[g_model.rssiSource];
|
||||
TelemetrySensor * sensor = &g_model.telemetrySensors[g_model.rssiSource - 1];
|
||||
if (sensor->isSameInstance(TELEM_PROTO_FRSKY_SPORT, instance)) {
|
||||
telemetryData.rssi.set(data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user