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-15 21:47:45 -07:00
committed by Bertrand Songis
parent 8e84724c62
commit e16b48db30
29 changed files with 87 additions and 60 deletions
+2 -2
View File
@@ -88,7 +88,7 @@ enum MenuModelTelemetryFrskyItems {
#endif
#define RSSI_ROWS LABEL(RSSI), 0, 0, 0,
#define VARIO_RANGE_ROWS 3
#define TELEMETRY_TYPE_ROWS (g_model.moduleData[INTERNAL_MODULE].rfProtocol == RF_PROTO_OFF && g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_PPM) ? (uint8_t)0 : HIDDEN_ROW,
#define TELEMETRY_TYPE_ROWS (!IS_INTERNAL_MODULE_ENABLED() && g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_PPM) ? (uint8_t)0 : HIDDEN_ROW,
enum SensorFields {
SENSOR_FIELD_NAME,
@@ -516,7 +516,7 @@ void menuModelTelemetryFrsky(event_t event)
case ITEM_TELEMETRY_RSSI_LABEL:
#if defined(MULTIMODULE)
if (g_model.moduleData[INTERNAL_MODULE].rfProtocol == RF_PROTO_OFF &&
if (g_model.moduleData[INTERNAL_MODULE].type != MODULE_TYPE_XJT &&
g_model.moduleData[EXTERNAL_MODULE].type == MODULE_TYPE_MULTIMODULE &&
g_model.moduleData[EXTERNAL_MODULE].getMultiProtocol(false) == MM_RF_PROTO_FS_AFHDS2A)
lcdDrawTextAlignedLeft(y, PSTR("RSNR"));