fix: Internal PXX exclusive S.PORT (#3822)
This commit is contained in:
@@ -133,60 +133,6 @@ typedef struct {
|
||||
|
||||
rxStatStruct *getRxStatLabels();
|
||||
|
||||
// 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()
|
||||
{
|
||||
#if defined(HARDWARE_EXTERNAL_MODULE)
|
||||
bool sportUsed = isSportLineUsedByInternalModule();
|
||||
|
||||
#if defined(CROSSFIRE)
|
||||
if (isModuleCrossfire(EXTERNAL_MODULE)) {
|
||||
return PROTOCOL_TELEMETRY_CROSSFIRE;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(GHOST)
|
||||
if (isModuleGhost(EXTERNAL_MODULE)) {
|
||||
return PROTOCOL_TELEMETRY_GHOST;
|
||||
}
|
||||
#endif
|
||||
|
||||
// TODO: PPM driver should support setting up a telemetry parser callback
|
||||
if (!sportUsed && isModulePPM(EXTERNAL_MODULE)) {
|
||||
return g_model.telemetryProtocol;
|
||||
}
|
||||
|
||||
#if defined(MULTIMODULE)
|
||||
if (!sportUsed && isModuleMultimodule(EXTERNAL_MODULE)) {
|
||||
return PROTOCOL_TELEMETRY_MULTIMODULE;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(AFHDS3)
|
||||
if (isModuleAFHDS3(EXTERNAL_MODULE)) {
|
||||
return PROTOCOL_TELEMETRY_AFHDS3;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (isModuleDSMP(EXTERNAL_MODULE)) {
|
||||
return PROTOCOL_TELEMETRY_DSMP;
|
||||
}
|
||||
|
||||
#endif // HARDWARE_EXTERNAL_MODULE
|
||||
|
||||
// TODO: Check if that is really necessary...
|
||||
#if defined(AFHDS2) && defined(HARDWARE_INTERNAL_MODULE)
|
||||
if (isModuleAFHDS2A(INTERNAL_MODULE)) {
|
||||
return PROTOCOL_TELEMETRY_FLYSKY_NV14;
|
||||
}
|
||||
#endif
|
||||
|
||||
// default choice
|
||||
return PROTOCOL_TELEMETRY_FRSKY_SPORT;
|
||||
}
|
||||
|
||||
#include "telemetry_sensors.h"
|
||||
|
||||
#if defined(LOG_TELEMETRY) && !defined(SIMU)
|
||||
|
||||
Reference in New Issue
Block a user