1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-24 00:35:18 +03:00

Reduce RF_PROTO_OFF logic, disable R9M Sport out when internal telemetry is on (#5159)

* Remove most of the special logic associated with RF_PROTO_OFF

This simplifies code in many areas since the internal module does not require special handling and also fixes a few bugs with INTERNAL_PPM

* Disable R9M sport option if internal module has telemetry

* Fix X12s build

* Use macros instead of direct comparisions

* Fix sport bit sent the wrong way. Rename S.port out to Telemetry

* Compile fix
This commit is contained in:
Arne Schwabe 2017-08-16 06:47:45 +02:00 committed by Bertrand Songis
parent 8e84724c62
commit e16b48db30
29 changed files with 87 additions and 60 deletions

View file

@ -56,12 +56,6 @@ lcdint_t applyChannelRatio(source_t channel, lcdint_t val)
}
#endif
#if defined(STM32)
#define IS_TELEMETRY_INTERNAL_MODULE (g_model.moduleData[INTERNAL_MODULE].rfProtocol != RF_PROTO_OFF)
#else
#define IS_TELEMETRY_INTERNAL_MODULE (false)
#endif
void processTelemetryData(uint8_t data)
{
#if defined(CROSSFIRE)
@ -179,7 +173,7 @@ void telemetryWakeup()
}
#if defined(PCBTARANIS) || defined(PCBHORUS)
if ((g_model.moduleData[INTERNAL_MODULE].rfProtocol != RF_PROTO_OFF || IS_MODULE_PXX(EXTERNAL_MODULE)) && FRSKY_BAD_ANTENNA()) {
if ((IS_MODULE_PXX(INTERNAL_MODULE) || IS_MODULE_PXX(EXTERNAL_MODULE)) && FRSKY_BAD_ANTENNA()) {
AUDIO_SWR_RED();
POPUP_WARNING(STR_WARNING);
const char * w = STR_ANTENNAPROBLEM;