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

3djc/telem rename (#3678)

* Rename EXT option to TELEMETRY

* Change test accordingly

* Rename FRSKY to TELEMETRY_FRSKY

* Rename ARDUPILOT to TELEMETRY_ARDUPILOT

* More renames (JETI, MAVLINK, NMEA)

* Fixes to make commit-test happy

* Further tests added to commit-test

* Cleanup

* Rename EXTSTD to TELEMETRY_NONE
This commit is contained in:
3djc 2016-08-02 21:53:25 +02:00 committed by Bertrand Songis
parent 0b67d412a0
commit 52435703a0
62 changed files with 203 additions and 198 deletions

View file

@ -63,7 +63,7 @@ inline void drawSleepBitmap()
#define LOAD_MODEL_BITMAP()
#define IS_MAIN_VIEW_DISPLAYED() menuHandlers[0] == menuMainView
#if defined(FRSKY)
#if defined(TELEMETRY_FRSKY)
#define IS_TELEMETRY_VIEW_DISPLAYED() menuHandlers[0] == menuTelemetryFrsky
#else
#define IS_TELEMETRY_VIEW_DISPLAYED() false

View file

@ -390,7 +390,7 @@ void lcdDrawNumber(coord_t x, coord_t y, lcdint_t val, LcdFlags flags, uint8_t l
if (mode > 0)
x += 2;
}
#if defined(BOLD_FONT) && !defined(CPUM64) || defined(EXTSTD)
#if defined(BOLD_FONT) && !defined(CPUM64) || defined(TELEMETRY_NONE)
if (flags & BOLD) fw += 1;
#endif
}
@ -462,7 +462,7 @@ void lcdDrawNumber(coord_t x, coord_t y, lcdint_t val, LcdFlags flags, uint8_t l
if (dblsize && (lcduint_t)val >= 1000 && (lcduint_t)val < 10000) x-=2;
val = qr.quot;
x -= fw;
#if defined(BOLD_FONT) && !defined(CPUM64) || defined(EXTSTD)
#if defined(BOLD_FONT) && !defined(CPUM64) || defined(TELEMETRY_NONE)
if (i==len && (flags & BOLD)) x += 1;
#endif
}
@ -915,7 +915,7 @@ void putsChannel(coord_t x, coord_t y, source_t channel, LcdFlags att)
putsChannelValue(x, y, channel, value, att);
}
#elif defined(FRSKY)
#elif defined(TELEMETRY_FRSKY)
void putsValueWithUnit(coord_t x, coord_t y, lcdint_t val, uint8_t unit, LcdFlags att)
{
convertUnit(val, unit);
@ -954,7 +954,7 @@ void putsTelemetryChannelValue(coord_t x, coord_t y, uint8_t channel, lcdint_t v
att &= ~NO_UNIT;
putsTimer(x, y, val, att, att);
break;
#if defined(FRSKY)
#if defined(TELEMETRY_FRSKY)
case TELEM_MIN_A1-1:
case TELEM_MIN_A2-1:
#if defined(CPUARM)
@ -1044,7 +1044,7 @@ void putsTelemetryChannelValue(coord_t x, coord_t y, uint8_t channel, lcdint_t v
putsValueWithUnit(x, y, val, UNIT_HDG, att);
break;
#if defined(FRSKY_SPORT)
#if defined(TELEMETRY_FRSKY_SPORT)
case TELEM_ALT-1:
putsValueWithUnit(x, y, div_and_round(val, 10), UNIT_DIST, att|PREC1);
break;
@ -1073,7 +1073,7 @@ void putsTelemetryChannelValue(coord_t x, coord_t y, uint8_t channel, lcdint_t v
}
}
}
#else // defined(FRSKY)
#else // defined(TELEMETRY_FRSKY)
void putsTelemetryChannelValue(coord_t x, coord_t y, uint8_t channel, lcdint_t val, uint8_t att)
{
switch (channel) {

View file

@ -20,7 +20,7 @@
#include "opentx.h"
#if defined(MAVLINK)
#if defined(TELEMETRY_MAVLINK)
#include "view_mavlink.h"
#endif

View file

@ -385,7 +385,7 @@ void gvarWeightItem(coord_t x, coord_t y, MixData *md, uint8_t attr, uint8_t eve
MD_UNION_TO_WEIGHT(weight, md);
}
#if !defined(CPUM64) || !defined(FRSKY)
#if !defined(CPUM64) || !defined(TELEMETRY_FRSKY)
#define GAUGE_WIDTH 33
#define GAUGE_HEIGHT 6
void drawOffsetBar(uint8_t x, uint8_t y, MixData * md)
@ -506,7 +506,7 @@ void menuModelMixOne(uint8_t event)
MD_OFFSET_TO_UNION(md2, offset);
offset.word = GVAR_MENU_ITEM(COLUMN_X+MIXES_2ND_COLUMN, y, offset.word, GV_RANGELARGE_OFFSET_NEG, GV_RANGELARGE_OFFSET, attr|LEFT, 0, event);
MD_UNION_TO_OFFSET(offset, md2);
#if !defined(CPUM64) || !defined(FRSKY)
#if !defined(CPUM64) || !defined(TELEMETRY_FRSKY)
drawOffsetBar(COLUMN_X+MIXES_2ND_COLUMN+22, y, md2);
#endif
break;

View file

@ -151,7 +151,7 @@ void menuModelLogicalSwitchOne(uint8_t event)
INCDEC_ENABLE_CHECK(isSourceAvailable);
}
else {
#if defined(FRSKY)
#if defined(TELEMETRY_FRSKY)
if (v1_val >= MIXSRC_FIRST_TELEM) {
#if defined(CPUARM)
putsChannelValue(CSWONE_2ND_COLUMN, y, v1_val, convertLswTelemValue(cs), attr|LEFT);
@ -380,7 +380,7 @@ void menuModelLogicalSwitches(uint8_t event)
putsChannelValue(CSW_3RD_COLUMN, y, v1_val, calc100toRESX(cs->v2), LEFT|attr2);
v2_min = -30000;
v2_max = 30000;
#elif defined(FRSKY)
#elif defined(TELEMETRY_FRSKY)
if (v1_val >= MIXSRC_FIRST_TELEM) {
putsTelemetryChannelValue(CSW_3RD_COLUMN, y, v1_val - MIXSRC_FIRST_TELEM, convertLswTelemValue(cs), LEFT|attr2);
v2_max = maxTelemValue(v1_val - MIXSRC_FIRST_TELEM + 1);

View file

@ -121,7 +121,7 @@ enum menuModelTelemetryItems {
ITEM_TELEMETRY_MAX
};
#if defined(FRSKY)
#if defined(TELEMETRY_FRSKY)
#define TELEM_COL1 INDENT_WIDTH
#if defined(TRANSLATIONS_FR) || defined(TRANSLATIONS_CZ)
#define TELEM_COL2 (9*FW)

View file

@ -233,7 +233,7 @@ void menuGeneralSetup(uint8_t event)
#if defined(AUDIO)
case ITEM_SETUP_BEEP_MODE:
g_eeGeneral.beepMode = selectMenuItem(RADIO_SETUP_2ND_COLUMN, y, STR_SPEAKER, STR_VBEEPMODE, g_eeGeneral.beepMode, -2, 1, attr, event);
#if defined(FRSKY)
#if defined(TELEMETRY_FRSKY)
if (attr && checkIncDec_Ret) frskySendAlarms();
#endif
break;
@ -241,7 +241,7 @@ void menuGeneralSetup(uint8_t event)
#if defined(BUZZER)
case ITEM_SETUP_BUZZER_MODE:
g_eeGeneral.buzzerMode = selectMenuItem(RADIO_SETUP_2ND_COLUMN, y, STR_BUZZER, STR_VBEEPMODE, g_eeGeneral.buzzerMode, -2, 1, attr, event);
#if defined(FRSKY)
#if defined(TELEMETRY_FRSKY)
if (attr && checkIncDec_Ret) frskySendAlarms();
#endif
break;
@ -249,7 +249,7 @@ void menuGeneralSetup(uint8_t event)
#elif defined(BUZZER)
case ITEM_SETUP_BUZZER_MODE:
g_eeGeneral.beepMode = selectMenuItem(RADIO_SETUP_2ND_COLUMN, y, STR_SPEAKER, STR_VBEEPMODE, g_eeGeneral.beepMode, -2, 1, attr, event);
#if defined(FRSKY)
#if defined(TELEMETRY_FRSKY)
if (attr && checkIncDec_Ret) frskySendAlarms();
#endif
break;
@ -470,7 +470,7 @@ void menuGeneralSetup(uint8_t event)
}
#endif
#if defined(FRSKY) && defined(FRSKY_HUB) && defined(GPS)
#if defined(TELEMETRY_FRSKY) && defined(FRSKY_HUB) && defined(GPS)
case ITEM_SETUP_TIMEZONE:
lcd_putsLeft(y, STR_TIMEZONE);
lcdDrawNumber(RADIO_SETUP_2ND_COLUMN, y, g_eeGeneral.timezone, attr|LEFT);
@ -518,7 +518,7 @@ void menuGeneralSetup(uint8_t event)
break;
#endif
#if defined(MAVLINK)
#if defined(TELEMETRY_MAVLINK)
case ITEM_MAVLINK_BAUD:
g_eeGeneral.mavbaud = selectMenuItem(RADIO_SETUP_2ND_COLUMN, y, STR_MAVLINK_BAUD_LABEL, STR_MAVLINK_BAUDS, g_eeGeneral.mavbaud, 0, 7, attr, event);
break;

View file

@ -81,7 +81,7 @@ void displayTrims(uint8_t phase)
uint8_t att = ROUND;
int16_t val = getTrimValue(phase, i);
#if !defined(CPUM64) || !defined(FRSKY)
#if !defined(CPUM64) || !defined(TELEMETRY_FRSKY)
int16_t dir = val;
bool exttrim = false;
if (val < TRIM_MIN || val > TRIM_MAX) {
@ -106,7 +106,7 @@ void displayTrims(uint8_t phase)
lcdDrawSolidVerticalLine(xm+1, ym-1, 3);
}
ym -= val;
#if !defined(CPUM64) || !defined(FRSKY)
#if !defined(CPUM64) || !defined(TELEMETRY_FRSKY)
lcdDrawFilledRect(xm-3, ym-3, 7, 7, SOLID, att|ERASE);
if (dir >= 0) {
lcdDrawSolidHorizontalLine(xm-1, ym-1, 3);
@ -132,7 +132,7 @@ void displayTrims(uint8_t phase)
lcdDrawSolidHorizontalLine(xm-1, ym-1, 3);
lcdDrawSolidHorizontalLine(xm-1, ym+1, 3);
xm += val;
#if !defined(CPUM64) || !defined(FRSKY)
#if !defined(CPUM64) || !defined(TELEMETRY_FRSKY)
lcdDrawFilledRect(xm-3, ym-3, 7, 7, SOLID, att|ERASE);
if (dir >= 0) {
lcdDrawSolidVerticalLine(xm+1, ym-1, 3);
@ -249,12 +249,12 @@ void onMainViewMenu(const char *result)
POPUP_MENU_ADD_ITEM(STR_RESET_TIMER1);
POPUP_MENU_ADD_ITEM(STR_RESET_TIMER2);
POPUP_MENU_ADD_ITEM(STR_RESET_TIMER3);
#if defined(FRSKY)
#if defined(TELEMETRY_FRSKY)
POPUP_MENU_ADD_ITEM(STR_RESET_TELEMETRY);
#endif
}
#endif
#if defined(FRSKY)
#if defined(TELEMETRY_FRSKY)
else if (result == STR_RESET_TELEMETRY) {
telemetryReset();
}
@ -328,7 +328,7 @@ void menuMainView(uint8_t event)
#else
POPUP_MENU_ADD_ITEM(STR_RESET_TIMER1);
POPUP_MENU_ADD_ITEM(STR_RESET_TIMER2);
#if defined(FRSKY)
#if defined(TELEMETRY_FRSKY)
POPUP_MENU_ADD_ITEM(STR_RESET_TELEMETRY);
#endif
POPUP_MENU_ADD_ITEM(STR_RESET_FLIGHT);
@ -373,19 +373,19 @@ void menuMainView(uint8_t event)
break;
case EVT_KEY_TELEMETRY:
#if defined(FRSKY)
#if defined(TELEMETRY_FRSKY)
if (!IS_FAI_ENABLED())
chainMenu(menuTelemetryFrsky);
#elif defined(JETI)
#elif defined(TELEMETRY_JETI)
JETI_EnableRXD(); // enable JETI-Telemetry reception
chainMenu(menuTelemetryJeti);
#elif defined(ARDUPILOT)
#elif defined(TELEMETRY_ARDUPILOT)
ARDUPILOT_EnableRXD(); // enable ArduPilot-Telemetry reception
chainMenu(menuTelemetryArduPilot);
#elif defined(NMEA)
#elif defined(TELEMETRY_NMEA)
NMEA_EnableRXD(); // enable NMEA-Telemetry reception
chainMenu(menuTelemetryNMEA);
#elif defined(MAVLINK)
#elif defined(TELEMETRY_MAVLINK)
chainMenu(menuTelemetryMavlink);
#else
chainMenu(menuStatisticsDebug);

View file

@ -55,7 +55,7 @@ void displayRssiLine()
}
}
#if defined(FRSKY) && defined(FRSKY_HUB) && defined(GPS) && !defined(CPUARM)
#if defined(TELEMETRY_FRSKY) && defined(FRSKY_HUB) && defined(GPS) && !defined(CPUARM)
void displayGpsTime()
{
uint8_t att = (TELEMETRY_STREAMING() ? LEFT|LEADING0 : LEFT|LEADING0|BLINK);

View file

@ -71,7 +71,7 @@ void onMainViewMenu(const char *result);
void menuMainViewChannelsMonitor(uint8_t event);
void menuChannelsView(uint8_t event);
void menuMainView(uint8_t event);
#if defined(FRSKY)
#if defined(TELEMETRY_FRSKY)
void menuTelemetryFrsky(uint8_t event);
#endif
void menuCustomFunctions(uint8_t event, CustomFunctionData * functions, CustomFunctionsContext * functionsContext);

View file

@ -215,7 +215,7 @@ void menuGeneralSetup(uint8_t event)
case ITEM_SETUP_BEEP_MODE:
g_eeGeneral.beepMode = selectMenuItem(RADIO_SETUP_2ND_COLUMN, y, STR_SPEAKER, STR_VBEEPMODE, g_eeGeneral.beepMode, -2, 1, attr, event);
#if defined(FRSKY)
#if defined(TELEMETRY_FRSKY)
if (attr && checkIncDec_Ret) frskySendAlarms();
#endif
break;
@ -402,7 +402,7 @@ void menuGeneralSetup(uint8_t event)
}
#endif
#if defined(FRSKY) && defined(FRSKY_HUB) && defined(GPS)
#if defined(TELEMETRY_FRSKY) && defined(FRSKY_HUB) && defined(GPS)
case ITEM_SETUP_LABEL_GPS:
lcd_putsLeft(y, STR_GPS);
break;
@ -456,7 +456,7 @@ void menuGeneralSetup(uint8_t event)
break;
#endif
#if defined(MAVLINK)
#if defined(TELEMETRY_MAVLINK)
case ITEM_MAVLINK_BAUD:
g_eeGeneral.mavbaud = selectMenuItem(RADIO_SETUP_2ND_COLUMN, y, STR_MAVLINK_BAUD_LABEL, STR_MAVLINK_BAUDS, g_eeGeneral.mavbaud, 0, 7, attr, event);
break;

View file

@ -226,7 +226,7 @@ bool menuGeneralSetup(evt_t event)
case ITEM_SETUP_BEEP_MODE:
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_SPEAKER);
g_eeGeneral.beepMode = selectMenuItem(RADIO_SETUP_2ND_COLUMN, y, STR_VBEEPMODE, g_eeGeneral.beepMode, -2, 1, attr, event);
#if defined(FRSKY)
#if defined(TELEMETRY_FRSKY)
if (attr && checkIncDec_Ret) frskySendAlarms();
#endif
break;
@ -470,7 +470,7 @@ bool menuGeneralSetup(evt_t event)
break;
#endif
#if defined(MAVLINK)
#if defined(TELEMETRY_MAVLINK)
case ITEM_MAVLINK_BAUD:
lcdDrawText(MENUS_MARGIN_LEFT, y, STR_MAVLINK_BAUD_LABEL);
g_eeGeneral.mavbaud = selectMenuItem(RADIO_SETUP_2ND_COLUMN, y, STR_MAVLINK_BAUDS, g_eeGeneral.mavbaud, 0, 7, attr, event);

View file

@ -218,7 +218,7 @@ bool isSourceAvailableInCustomSwitches(int source)
{
bool result = isSourceAvailable(source);
#if defined(FRSKY)
#if defined(TELEMETRY_FRSKY)
if (result && source>=MIXSRC_FIRST_TELEM && source<=MIXSRC_LAST_TELEM) {
div_t qr = div(source-MIXSRC_FIRST_TELEM, 3);
result = isTelemetryFieldComparisonAvailable(qr.quot);