Slightly revamp telemetry polling

This commit is contained in:
Raphael Coeffic
2021-11-21 11:18:35 +01:00
committed by Raphael Coeffic
parent 2abf07ed9b
commit 42508f4173
2 changed files with 111 additions and 73 deletions
+4 -5
View File
@@ -149,6 +149,9 @@ inline const char* getRssiLabel()
return "RSSI";
}
// TODO: this should handle only the external S.PORT line
// - and go away in the end: one proto per module, not global!
//
inline uint8_t modelTelemetryProtocol()
{
bool sportUsed = isSportLineUsedByInternalModule();
@@ -173,11 +176,6 @@ inline uint8_t modelTelemetryProtocol()
if (!sportUsed && isModuleMultimodule(EXTERNAL_MODULE)) {
return PROTOCOL_TELEMETRY_MULTIMODULE;
}
#if defined(INTERNAL_MODULE_MULTI)
if (isModuleMultimodule(INTERNAL_MODULE) && isModuleNone(EXTERNAL_MODULE)) {
return PROTOCOL_TELEMETRY_MULTIMODULE;
}
#endif
#endif
#if defined(AFHDS3)
@@ -186,6 +184,7 @@ inline uint8_t modelTelemetryProtocol()
}
#endif
// TODO: Check if that is really necessary...
#if defined(AFHDS2)
if (isModuleAFHDS2A(INTERNAL_MODULE)) {
return PROTOCOL_TELEMETRY_FLYSKY_NV14;