1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-15 04:15:26 +03:00

More unneeded definitions removed

This commit is contained in:
Bertrand Songis 2019-08-20 18:04:19 +02:00
parent 487a76e8ba
commit 2ce17f3b68
No known key found for this signature in database
GPG key ID: F189F79290FEC50F
45 changed files with 37 additions and 197 deletions

View file

@ -859,9 +859,7 @@ enum ResetFunctionParam {
FUNC_RESET_TIMER2,
FUNC_RESET_TIMER3,
FUNC_RESET_FLIGHT,
#if defined(TELEMETRY_FRSKY)
FUNC_RESET_TELEMETRY,
#endif
FUNC_RESET_PARAM_FIRST_TELEM,
FUNC_RESET_PARAM_LAST_TELEM = FUNC_RESET_PARAM_FIRST_TELEM + MAX_TELEMETRY_SENSORS,
FUNC_RESET_PARAMS_COUNT,

View file

@ -194,11 +194,9 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
mainRequestFlags |= (1 << REQUEST_FLIGHT_RESET); // on systems with threads flightReset() must not be called from the mixers thread!
}
break;
#if defined(TELEMETRY_FRSKY)
case FUNC_RESET_TELEMETRY:
telemetryReset();
break;
#endif
}
if (CFN_PARAM(cfn)>=FUNC_RESET_PARAM_FIRST_TELEM) {
uint8_t item = CFN_PARAM(cfn)-FUNC_RESET_PARAM_FIRST_TELEM;
@ -338,7 +336,7 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
}
#endif
#if defined(TELEMETRY_FRSKY) && defined(VARIO)
#if defined(VARIO)
case FUNC_VARIO:
newActiveFunctions |= (1 << FUNCTION_VARIO);
break;

View file

@ -309,11 +309,7 @@ void showAlertBox(const char * title, const char * text, const char * action , u
#define LOAD_MODEL_BITMAP()
#define IS_MAIN_VIEW_DISPLAYED() menuHandlers[0] == menuMainView
#if defined(TELEMETRY_FRSKY)
#define IS_TELEMETRY_VIEW_DISPLAYED() menuHandlers[0] == menuViewTelemetryFrsky
#else
#define IS_TELEMETRY_VIEW_DISPLAYED() false
#endif
#define IS_OTHER_VIEW_DISPLAYED() false
void editCurveRef(coord_t x, coord_t y, CurveRef & curve, event_t event, LcdFlags flags);

View file

@ -101,7 +101,7 @@ enum MenuModelIndexes {
#if defined(LUA_MODEL_SCRIPTS)
MENU_MODEL_CUSTOM_SCRIPTS,
#endif
CASE_FRSKY(MENU_MODEL_TELEMETRY_FRSKY)
MENU_MODEL_TELEMETRY,
MENU_MODEL_DISPLAY,
MENU_MODEL_PAGES_COUNT
};
@ -124,7 +124,7 @@ void menuModelGVars(event_t event);
void menuModelLogicalSwitches(event_t event);
void menuModelSpecialFunctions(event_t event);
void menuModelCustomScripts(event_t event);
void menuModelTelemetryFrsky(event_t event);
void menuModelTelemetry(event_t event);
void menuModelSensor(event_t event);
void menuModelDisplay(event_t event);
void menuModelTemplates(event_t event);
@ -144,7 +144,7 @@ static const MenuHandlerFunc menuTabModel[] = {
#if defined(LUA_MODEL_SCRIPTS)
menuModelCustomScripts,
#endif
CASE_FRSKY(menuModelTelemetryFrsky)
menuModelTelemetry,
menuModelDisplay,
};

View file

@ -154,7 +154,6 @@ void menuModelLogicalSwitchOne(event_t event)
INCDEC_ENABLE_CHECK(isSourceAvailable);
}
else {
#if defined(TELEMETRY_FRSKY)
if (v1_val >= MIXSRC_FIRST_TELEM) {
drawSourceCustomValue(CSWONE_2ND_COLUMN, y, v1_val, convertLswTelemValue(cs), attr|LEFT);
v2_max = maxTelemValue(v1_val - MIXSRC_FIRST_TELEM + 1);
@ -171,7 +170,6 @@ void menuModelLogicalSwitchOne(event_t event)
}
}
else
#endif // TELEMETRY_FRSKY
{
LcdFlags lf = attr | LEFT;
getMixSrcRange(v1_val, v2_min, v2_max, &lf);

View file

@ -118,9 +118,9 @@ void onDeleteAllSensorsConfirm(const char * result)
}
}
void menuModelTelemetryFrsky(event_t event)
void menuModelTelemetry(event_t event)
{
MENU(STR_MENUTELEMETRY, menuTabModel, MENU_MODEL_TELEMETRY_FRSKY, HEADER_LINE+ITEM_TELEMETRY_MAX, { HEADER_LINE_COLUMNS TELEMETRY_TYPE_ROWS RSSI_ROWS SENSORS_ROWS VARIO_ROWS });
MENU(STR_MENUTELEMETRY, menuTabModel, MENU_MODEL_TELEMETRY, HEADER_LINE+ITEM_TELEMETRY_MAX, { HEADER_LINE_COLUMNS TELEMETRY_TYPE_ROWS RSSI_ROWS SENSORS_ROWS VARIO_ROWS });
uint8_t sub = menuVerticalPosition - HEADER_LINE;

View file

@ -529,7 +529,7 @@ void menuRadioSetup(event_t event)
break;
#endif
#if defined(TELEMETRY_FRSKY) && defined(GPS)
#if defined(GPS)
case ITEM_RADIO_SETUP_TIMEZONE:
lcdDrawTextAlignedLeft(y, STR_TIMEZONE);
lcdDrawNumber(RADIO_SETUP_2ND_COLUMN, y, g_eeGeneral.timezone, attr|LEFT);

View file

@ -47,15 +47,12 @@
#define TRIM_LH_POS (TRIM_LH_X-4*FW)
#define TRIM_RH_NEG (TRIM_RH_X+1*FW)
#define TRIM_RH_POS (TRIM_RH_X-4*FW)
#if defined(TELEMETRY_FRSKY)
#define RSSSI_X (30)
#define RSSSI_Y (31)
#define RSSI_MAX 105
#endif
#define TRIM_LEN 23
#if defined(TELEMETRY_FRSKY)
void drawRSSIGauge()
{
uint8_t bar = (RSSI_MAX - g_model.rssiAlarms.getWarningRssi()) / 4;
@ -66,7 +63,6 @@ void drawRSSIGauge()
}
}
}
#endif
void drawPotsBars()
{
@ -276,15 +272,11 @@ 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(TELEMETRY_FRSKY)
POPUP_MENU_ADD_ITEM(STR_RESET_TELEMETRY);
#endif
}
#if defined(TELEMETRY_FRSKY)
else if (result == STR_RESET_TELEMETRY) {
telemetryReset();
}
#endif
else if (result == STR_RESET_FLIGHT) {
flightReset();
}
@ -385,11 +377,7 @@ void menuMainView(event_t event)
#endif
case EVT_KEY_TELEMETRY:
#if defined(TELEMETRY_FRSKY)
chainMenu(menuViewTelemetryFrsky);
#else
chainMenu(menuStatisticsDebug);
#endif
killEvents(event);
break;
@ -419,12 +407,10 @@ void menuMainView(event_t event)
// Trims sliders
displayTrims(mode);
#if defined(TELEMETRY_FRSKY)
// RSSI gauge
if (TELEMETRY_RSSI() > 0) {
drawRSSIGauge();
}
#endif
}
if (view_base < VIEW_INPUTS) {

View file

@ -37,7 +37,7 @@ const MenuHandlerFunc menuTabModel[] = {
#if defined(LUA_MODEL_SCRIPTS)
menuModelCustomScripts,
#endif
CASE_FRSKY(menuModelTelemetryFrsky)
menuModelTelemetry,
menuModelDisplay
};

View file

@ -94,7 +94,7 @@ enum MenuModelIndexes {
#if defined(LUA_MODEL_SCRIPTS)
MENU_MODEL_CUSTOM_SCRIPTS,
#endif
MENU_MODEL_TELEMETRY_FRSKY,
MENU_MODEL_TELEMETRY,
MENU_MODEL_DISPLAY,
MENU_MODEL_PAGES_COUNT
};
@ -117,7 +117,7 @@ void menuModelGVars(event_t event);
void menuModelLogicalSwitches(event_t event);
void menuModelSpecialFunctions(event_t event);
void menuModelCustomScripts(event_t event);
void menuModelTelemetryFrsky(event_t event);
void menuModelTelemetry(event_t event);
void menuModelSensor(event_t event);
void menuModelDisplay(event_t event);

View file

@ -99,9 +99,9 @@ void onDeleteAllSensorsConfirm(const char * result)
}
}
void menuModelTelemetryFrsky(event_t event)
void menuModelTelemetry(event_t event)
{
MENU(STR_MENUTELEMETRY, menuTabModel, MENU_MODEL_TELEMETRY_FRSKY, HEADER_LINE+ITEM_TELEMETRY_MAX, { HEADER_LINE_COLUMNS TELEMETRY_TYPE_ROWS RSSI_ROWS SENSORS_ROWS VARIO_ROWS });
MENU(STR_MENUTELEMETRY, menuTabModel, MENU_MODEL_TELEMETRY, HEADER_LINE+ITEM_TELEMETRY_MAX, { HEADER_LINE_COLUMNS TELEMETRY_TYPE_ROWS RSSI_ROWS SENSORS_ROWS VARIO_ROWS });
uint8_t sub = menuVerticalPosition - HEADER_LINE;

View file

@ -484,7 +484,7 @@ void menuRadioSetup(event_t event)
break;
#endif
#if defined(TELEMETRY_FRSKY) && defined(GPS)
#if defined(GPS)
case ITEM_RADIO_SETUP_LABEL_GPS:
lcdDrawTextAlignedLeft(y, STR_GPS);
break;

View file

@ -36,7 +36,7 @@ const MenuHandlerFunc menuTabModel[] = {
#if defined(LUA_MODEL_SCRIPTS)
menuModelCustomScripts,
#endif
CASE_FRSKY(menuModelTelemetryFrsky)
menuModelTelemetry
};
void editCurveRef(coord_t x, coord_t y, CurveRef & curve, event_t event, LcdFlags attr);

View file

@ -123,7 +123,7 @@ enum EnumTabModel {
#if defined(LUA_MODEL_SCRIPTS)
MENU_MODEL_CUSTOM_SCRIPTS,
#endif
CASE_FRSKY(MENU_MODEL_TELEMETRY_FRSKY)
MENU_MODEL_TELEMETRY,
MENU_MODEL_PAGES_COUNT
};
@ -177,7 +177,7 @@ bool menuModelGVars(event_t event);
bool menuModelLogicalSwitches(event_t event);
bool menuModelSpecialFunctions(event_t event);
bool menuModelCustomScripts(event_t event);
bool menuModelTelemetryFrsky(event_t event);
bool menuModelTelemetry(event_t event);
bool menuModelSensor(event_t event);
bool menuModelExpoOne(event_t event);
bool menuModelModuleOptions(event_t event);

View file

@ -103,9 +103,9 @@ void onDeleteAllSensorsConfirm(const char * result)
}
}
bool menuModelTelemetryFrsky(event_t event)
bool menuModelTelemetry(event_t event)
{
MENU(STR_MENUTELEMETRY, MODEL_ICONS, menuTabModel, MENU_MODEL_TELEMETRY_FRSKY, ITEM_TELEMETRY_MAX, { TELEMETRY_TYPE_ROWS RSSI_ROWS SENSORS_ROWS VARIO_ROWS });
MENU(STR_MENUTELEMETRY, MODEL_ICONS, menuTabModel, MENU_MODEL_TELEMETRY, ITEM_TELEMETRY_MAX, { TELEMETRY_TYPE_ROWS RSSI_ROWS SENSORS_ROWS VARIO_ROWS });
for (uint8_t i=0; i<NUM_BODY_LINES; i++) {
coord_t y = MENU_CONTENT_TOP + i*FH;

View file

@ -581,7 +581,7 @@ void menuRadioHardware(event_t event)
lcdDrawTextAlignedLeft(y, STR_DEBUG);
lcdDrawText(HW_SETTINGS_COLUMN2, y, STR_ANALOGS_BTN, menuHorizontalPosition == 0 ? attr : 0);
lcdDrawText(lcdLastRightPos + 2, y, STR_KEYS_BTN, menuHorizontalPosition == 1 ? attr : 0);
if (attr && event == EVT_KEY_FIRST(KEY_ENTER)) {
if (attr && event == EVT_KEY_BREAK(KEY_ENTER)) {
if (menuHorizontalPosition == 0)
pushMenu(menuRadioDiagAnalogs);
else
@ -591,7 +591,7 @@ void menuRadioHardware(event_t event)
case ITEM_RADIO_BACKUP_EEPROM:
lcdDrawText(LCD_W / 2, y, BUTTON(STR_EEBACKUP), attr | CENTERED);
if (attr && event == EVT_KEY_FIRST(KEY_ENTER)) {
if (attr && event == EVT_KEY_BREAK(KEY_ENTER)) {
s_editMode = EDIT_SELECT_FIELD;
eepromBackup();
}
@ -599,7 +599,7 @@ void menuRadioHardware(event_t event)
case ITEM_RADIO_FACTORY_RESET:
lcdDrawText(LCD_W / 2, y, BUTTON(STR_FACTORYRESET), attr | CENTERED);
if (attr && event == EVT_KEY_FIRST(KEY_ENTER)) {
if (attr && event == EVT_KEY_BREAK(KEY_ENTER)) {
s_editMode = EDIT_SELECT_FIELD;
POPUP_CONFIRMATION(STR_CONFIRMRESET, onFactoryResetConfirm);
}

View file

@ -35,7 +35,6 @@
constexpr uint8_t COLUMN2_X = 10 * FW;
void menuRadioFirmwareOptions(event_t event)
{
title(STR_MENU_FIRM_OPTIONS);

View file

@ -233,12 +233,10 @@ bool isSourceAvailableInCustomSwitches(int source)
{
bool result = isSourceAvailable(source);
#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);
}
#endif
return result;
}

View file

@ -23,7 +23,6 @@
#include "dataconstants.h"
#if defined(TELEMETRY_FRSKY_SPORT)
PACK(union SportTelemetryPacket
{
struct {
@ -34,7 +33,6 @@ PACK(union SportTelemetryPacket
};
uint8_t raw[8];
});
#endif
#if defined(STM32)
bool isBootloader(const char * filename);

View file

@ -134,7 +134,6 @@ void writeHeader()
f_puts("Time,", &g_oLogFile);
#endif
#if defined(TELEMETRY_FRSKY)
char label[TELEM_LABEL_LEN+7];
for (int i=0; i<MAX_TELEMETRY_SENSORS; i++) {
@ -155,7 +154,6 @@ void writeHeader()
}
}
}
#endif
#if defined(PCBTARANIS) || defined(PCBHORUS)
for (uint8_t i=1; i<NUM_STICKS+NUM_POTS+NUM_SLIDERS+1; i++) {
@ -229,7 +227,6 @@ void logsWrite()
f_printf(&g_oLogFile, "%d,", tmr10ms);
#endif
#if defined(TELEMETRY_FRSKY)
for (int i=0; i<MAX_TELEMETRY_SENSORS; i++) {
if (isTelemetryFieldAvailable(i)) {
TelemetrySensor & sensor = g_model.telemetrySensors[i];
@ -267,7 +264,6 @@ void logsWrite()
}
}
}
#endif
for (uint8_t i=0; i<NUM_STICKS+NUM_POTS+NUM_SLIDERS; i++) {
f_printf(&g_oLogFile, "%d,", calibratedAnalogs[i]);

View file

@ -196,11 +196,9 @@ void per10ms()
}
#endif
#if defined(TELEMETRY_FRSKY) || defined(TELEMETRY_JETI)
if (!IS_DSM2_SERIAL_PROTOCOL(s_current_protocol[0])) {
telemetryInterrupt10ms();
}
#endif
// These moved here from evalFlightModeMixes() to improve beep trigger reliability.
#if defined(PWM_BACKLIGHT)
@ -674,7 +672,6 @@ getvalue_t convert16bitsTelemValue(source_t channel, ls_telemetry_value_t value)
return value;
}
#if defined(TELEMETRY_FRSKY)
ls_telemetry_value_t minTelemValue(source_t channel)
{
return 0;
@ -684,7 +681,6 @@ ls_telemetry_value_t maxTelemValue(source_t channel)
{
return 30000;
}
#endif
#define INAC_STICKS_SHIFT 6
#define INAC_SWITCHES_SHIFT 8
@ -1330,9 +1326,7 @@ void flightReset(uint8_t check)
}
#endif
#if defined(TELEMETRY_FRSKY)
telemetryReset();
#endif
s_mixer_first_run_done = false;
@ -1580,9 +1574,7 @@ void opentxClose(uint8_t shutdown)
watchdogSuspend(2000/*20s*/);
pausePulses(); // stop mixer task to disable trims processing while in shutdown
AUDIO_BYE();
#if defined(TELEMETRY_FRSKY)
// TODO needed? telemetryEnd();
#endif
#if defined(LUA)
luaClose(&lsScripts);
#if defined(COLORLCD)

View file

@ -103,7 +103,7 @@
#define CASE_PWM_BACKLIGHT(x)
#endif
#if defined(TELEMETRY_FRSKY) && defined(GPS)
#if defined(GPS)
#define CASE_GPS(x) x,
#else
#define CASE_GPS(x)
@ -133,12 +133,6 @@
#define CASE_PWR_BUTTON_PRESS(x)
#endif
#if defined(TELEMETRY_FRSKY)
#define CASE_FRSKY(x) x,
#else
#define CASE_FRSKY(x)
#endif
#if defined(PXX1)
#define CASE_PXX1(x) x,
#else
@ -1238,13 +1232,8 @@ char * strcat_zchar(char *dest, const char *name, uint8_t size, const char *defa
// Stick tolerance varies between transmitters, Higher is better
#define STICK_TOLERANCE 64
#if defined(TELEMETRY_FRSKY)
ls_telemetry_value_t minTelemValue(source_t channel);
ls_telemetry_value_t maxTelemValue(source_t channel);
#else
#define minTelemValue(channel) 255
#define maxTelemValue(channel) 255
#endif
getvalue_t convert16bitsTelemValue(source_t channel, ls_telemetry_value_t value);
getvalue_t convertLswTelemValue(LogicalSwitchData * cs);
@ -1277,7 +1266,6 @@ inline bool IS_TXBATT_WARNING()
return g_vbat100mV <= g_eeGeneral.vBatWarn;
}
#if defined(TELEMETRY_FRSKY)
enum TelemetryViews {
TELEMETRY_CUSTOM_SCREEN_1,
TELEMETRY_CUSTOM_SCREEN_2,
@ -1287,7 +1275,6 @@ enum TelemetryViews {
};
extern uint8_t s_frsky_view;
#endif
constexpr uint32_t EARTH_RADIUS = 6371009;

View file

@ -505,9 +505,6 @@ int main(int argc, char ** argv)
opentxSim->show(); // Otherwise the main window gets centred across my two monitors, split down the middle.
#endif
#if defined(TELEMETRY_FRSKY) && !defined(TELEMETRY_FRSKY_SPORT)
telemetryStreaming = 1;
#endif
printf("Model size = %d\n", (int)sizeof(g_model));

View file

@ -285,7 +285,6 @@ bool getLogicalSwitch(uint8_t idx)
}
else {
mixsrc_t v1 = ls->v1;
#if defined(TELEMETRY_FRSKY)
// Telemetry
if (v1 >= MIXSRC_FIRST_TELEM) {
if (!TELEMETRY_STREAMING() || IS_FAI_FORBIDDEN(v1-1)) {
@ -303,17 +302,6 @@ bool getLogicalSwitch(uint8_t idx)
else {
y = calc100toRESX(ls->v2);
}
#else
if (v1 >= MIXSRC_FIRST_TELEM) {
y = (int16_t)3 * (128+ls->v2); // it's a Timer
}
else if (v1 >= MIXSRC_GVAR1) {
y = ls->v2; // it's a GVAR
}
else {
y = calc100toRESX(ls->v2);
}
#endif
switch (ls->func) {
case LS_FUNC_VEQUAL:
@ -370,9 +358,7 @@ bool getLogicalSwitch(uint8_t idx)
}
}
#if defined(TELEMETRY_FRSKY)
DurationAndDelayProcessing:
#endif
if (ls->delay || ls->duration) {
LogicalSwitchContext &context = lswFm[mixerCurrentFlightMode].lsw[idx];

View file

@ -169,10 +169,10 @@ if(CROSSFIRE)
endif()
add_definitions(-DCPUARM)
add_definitions(-DTELEMETRY_FRSKY -DTELEMETRY_FRSKY_SPORT -DGPS)
add_definitions(-DGPS)
add_definitions(-DBOLD_FONT -DBATTGRAPH -DTHRTRACE)
add_definitions(-DREQUIRED_SDCARD_VERSION="${SDCARD_VERSION}")
include_directories(${COOS_DIR} ${COOS_DIR}/kernel ${COOS_DIR}/portable)
foreach(LANGUAGE ${TTS_LANGUAGES})
string(TOLOWER ${LANGUAGE} lang_lower)

View file

@ -316,17 +316,12 @@ void OpenTxSimulator::setTrainerTimeout(uint16_t ms)
void OpenTxSimulator::sendTelemetry(const QByteArray data)
{
#if defined(TELEMETRY_FRSKY_SPORT)
//OTXS_DBG << data;
sportProcessTelemetryPacket((uint8_t *)data.constData());
#else
Q_UNUSED(data)
#endif
}
uint8_t OpenTxSimulator::getSensorInstance(uint16_t id, uint8_t defaultValue)
{
#if defined(TELEMETRY_FRSKY_SPORT)
for (int i = 0; i < MAX_TELEMETRY_SENSORS; i++) {
if (isTelemetryFieldAvailable(i)) {
TelemetrySensor * sensor = &g_model.telemetrySensors[i];
@ -335,15 +330,11 @@ uint8_t OpenTxSimulator::getSensorInstance(uint16_t id, uint8_t defaultValue)
}
}
}
#else
Q_UNUSED(id)
#endif
return defaultValue;
}
uint16_t OpenTxSimulator::getSensorRatio(uint16_t id)
{
#if defined(TELEMETRY_FRSKY_SPORT)
for (int i = 0; i < MAX_TELEMETRY_SENSORS; i++) {
if (isTelemetryFieldAvailable(i)) {
TelemetrySensor * sensor = &g_model.telemetrySensors[i];
@ -352,9 +343,6 @@ uint16_t OpenTxSimulator::getSensorRatio(uint16_t id)
}
}
}
#else
Q_UNUSED(id)
#endif
return 0;
}
@ -378,9 +366,7 @@ const int OpenTxSimulator::getCapability(Capability cap)
break;
case CAP_TELEM_FRSKY_SPORT :
#ifdef TELEMETRY_FRSKY_SPORT
ret = 1;
#endif
break;
}
return ret;

View file

@ -109,7 +109,6 @@ extern "C" void UART0_IRQHandler()
#define SECOND_UART_Configure(...)
#endif
#if defined(TELEMETRY_FRSKY)
void auxSerialTelemetryInit(unsigned int /*protocol*/)
{
SECOND_UART_Configure(FRSKY_D_BAUDRATE, Master_frequency);
@ -119,7 +118,6 @@ bool telemetrySecondPortReceive(uint8_t & data)
{
return auxSerialRxFifo.pop(data);
}
#endif
#if defined(DEBUG) && !defined(SIMU)
void serialPrintf(const char*, ... ) {}

View file

@ -180,11 +180,9 @@ TASK_FUNCTION(mixerTask)
}
#endif
#if defined(TELEMETRY_FRSKY)
DEBUG_TIMER_START(debugTimerTelemetryWakeup);
telemetryWakeup();
DEBUG_TIMER_STOP(debugTimerTelemetryWakeup);
#endif
if (heartbeat == HEART_WDT_CHECK) {
wdt_reset();

View file

@ -100,13 +100,11 @@ bool pushFrskyTelemetryData(uint8_t data)
} // switch
#if defined(TELEMETRY_FRSKY_SPORT)
if (IS_FRSKY_SPORT_PROTOCOL() && telemetryRxBufferCount >= FRSKY_SPORT_PACKET_SIZE) {
// end of frame detected
dataState = STATE_DATA_IDLE;
return true;
}
#endif
return false;
}

View file

@ -21,11 +21,7 @@
#ifndef _TELEMETRY_H_
#define _TELEMETRY_H_
#if defined(TELEMETRY_FRSKY)
// FrSky Telemetry
#include "frsky.h"
#endif
#include "frsky.h"
#include "crossfire.h"
#if defined(MULTIMODULE)
#include "spektrum.h"

View file

@ -501,16 +501,12 @@ int setTelemetryValue(TelemetryProtocol protocol, uint16_t id, uint8_t subId, ui
int index = availableTelemetryIndex();
if (index >= 0) {
switch (protocol) {
#if defined(TELEMETRY_FRSKY_SPORT)
case TELEM_PROTO_FRSKY_SPORT:
frskySportSetDefault(index, id, subId, instance);
break;
#endif
#if defined(TELEMETRY_FRSKY)
case TELEM_PROTO_FRSKY_D:
frskyDSetDefault(index, id);
break;
#endif
#if defined(CROSSFIRE)
case TELEM_PROTO_CROSSFIRE:
crossfireSetDefault(index, id, instance);

View file

@ -21,17 +21,10 @@
#include "gtests.h"
void frskyDProcessPacket(const uint8_t *packet);
#if defined(TELEMETRY_FRSKY_SPORT)
bool checkSportPacket(const uint8_t *packet);
void sportProcessTelemetryPacket(const uint8_t * packet);
bool checkSportPacket(const uint8_t *packet);
void frskyCalculateCellStats(void);
void displayVoltagesScreen();
#endif
#if defined(TELEMETRY_FRSKY)
TEST(FrSky, TelemetryValueWithMinAveraging)
{
/*
@ -147,9 +140,6 @@ TEST(FrSky, Gps)
EXPECT_EQ(telemetryItems[0].gps.longitude, 45341666);
}
#endif // defined(TELEMETRY_FRSKY)
#if defined(TELEMETRY_FRSKY_SPORT)
TEST(FrSkySPORT, checkCrc)
{
// Packet downstream
@ -487,4 +477,3 @@ TEST(FrSkySPORT, frskyCurrent)
EXPECT_EQ(telemetryItems[0].valueMax, 505);
}
#endif //#if defined(TELEMETRY_FRSKY_SPORT)

View file

@ -80,13 +80,11 @@ inline void MIXER_RESET()
inline void TELEMETRY_RESET()
{
#if defined(TELEMETRY_FRSKY)
telemetryData.clear();
telemetryData.rssi.set(100);
for (int i=0; i<MAX_TELEMETRY_SENSORS; i++) {
telemetryItems[i].clear();
}
#endif
memclear(g_model.telemetrySensors, sizeof(g_model.telemetrySensors));
}

View file

@ -616,7 +616,6 @@ const char STR_BLONBRIGHTNESS[] = TR_BLONBRIGHTNESS;
const char STR_BLOFFBRIGHTNESS[] = TR_BLOFFBRIGHTNESS;
#endif
#if defined(TELEMETRY_FRSKY)
const char STR_TIMEZONE[] = TR_TIMEZONE;
const char STR_ADJUST_RTC[] = TR_ADJUST_RTC;
const char STR_GPS[] = TR_GPS;
@ -625,7 +624,6 @@ const char STR_VARIO[] = TR_VARIO;
const char STR_PITCH_AT_ZERO[] = TR_PITCH_AT_ZERO;
const char STR_PITCH_AT_MAX[] = TR_PITCH_AT_MAX;
const char STR_REPEAT_AT_ZERO[] = TR_REPEAT_AT_ZERO;
#endif
#if defined(EEPROM)
const char STR_BAD_RADIO_DATA[] = TR_BADEEPROMDATA;
@ -644,9 +642,7 @@ const char STR_STORAGE_FORMAT[] = TR_STORAGE_FORMAT;
const char STR_MENUCUSTOMSCRIPTS[] = TR_MENUCUSTOMSCRIPTS;
#endif
#if defined(TELEMETRY_FRSKY)
const char STR_MENUTELEMETRY[] = TR_MENUTELEMETRY;
#endif
#if defined(DSM2) || defined(PXX)
const char STR_RECEIVER_NUM[] = TR_RECEIVER_NUM;

View file

@ -258,11 +258,7 @@
#define LEN_VFSWRESET TR("\004", "\012")
#if defined(TELEMETRY_FRSKY)
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetrie")
#else
#define TR_FSW_RESET_TELEM
#endif
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetrie")
#if LCD_W >= 212
#define TR_FSW_RESET_TIMERS "Stopky1\0 ""Stopky2\0 ""Stopky3\0 "

View file

@ -261,11 +261,7 @@
#define LEN_VFSWRESET TR("\004", "\011")
#if defined(TELEMETRY_FRSKY)
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetrie")
#else
#define TR_FSW_RESET_TELEM
#endif
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetrie")
#if LCD_W >= 212
#define TR_FSW_RESET_TIMERS "Timer 1\0 ""Timer 2\0 ""Timer 3\0 "

View file

@ -257,15 +257,11 @@
#define TR_SF_SCREENSHOT "Screenshot"
#define TR_SF_RESERVE "[reserve]\0"
#define TR_VFSWFUNC TR_SF_SAFETY "Trainer\0 ""Inst. Trim""Reset\0 ""Set \0 " TR_ADJUST_GVAR "Volume\0 " "SetFailsfe" "RangeCheck" "ModuleBind" TR_SOUND TR_PLAY_TRACK TR_PLAY_VALUE TR_SF_RESERVE TR_SF_PLAY_SCRIPT TR_SF_RESERVE TR_SF_BG_MUSIC TR_VVARIO TR_HAPTIC TR_SDCLOGS "Backlight\0" TR_SF_SCREENSHOT TR_SF_TEST
#define TR_VFSWFUNC TR_SF_SAFETY "Trainer\0 ""Inst. Trim""Reset\0 ""Set \0 " TR_ADJUST_GVAR "Volume\0 " "SetFailsfe" "RangeCheck" "ModuleBind" TR_SOUND TR_PLAY_TRACK TR_PLAY_VALUE TR_SF_RESERVE TR_SF_PLAY_SCRIPT TR_SF_RESERVE TR_SF_BG_MUSIC TR_VVARIO TR_HAPTIC TR_SDCLOGS "Backlight\0" TR_SF_SCREENSHOT TR_SF_TEST
#define LEN_VFSWRESET TR("\004", "\011")
#if defined(TELEMETRY_FRSKY)
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetry")
#else
#define TR_FSW_RESET_TELEM
#endif
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetry")
#if LCD_W >= 212
#define TR_FSW_RESET_TIMERS "Timer 1\0 ""Timer 2\0 ""Timer 3\0 "

View file

@ -259,11 +259,7 @@
#define LEN_VFSWRESET TR("\004", "\011")
#if defined(TELEMETRY_FRSKY)
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetry")
#else
#define TR_FSW_RESET_TELEM
#endif
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetry")
#if defined(PCBTARANIS)
#define TR_FSW_RESET_TIMERS "Timer 1\0 ""Timer 2\0 ""Timer 3\0 "

View file

@ -259,11 +259,7 @@
#define LEN_VFSWRESET TR("\004", "\011")
#if defined(TELEMETRY_FRSKY)
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetry")
#else
#define TR_FSW_RESET_TELEM
#endif
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetry")
#if defined(PCBTARANIS)
#define TR_FSW_RESET_TIMERS "Timer 1\0 ""Timer 2\0 ""Timer 3\0 "

View file

@ -261,11 +261,7 @@
#define LEN_VFSWRESET TR("\004", "\012")
#if defined(TELEMETRY_FRSKY)
#define TR_FSW_RESET_TELEM TR("Télm", "Télémétrie")
#else
#define TR_FSW_RESET_TELEM
#endif
#define TR_FSW_RESET_TELEM TR("Télm", "Télémétrie")
#if LCD_W >= 212
#define TR_FSW_RESET_TIMERS "Chrono 1\0 ""Chrono 2\0 ""Chrono 3\0 "

View file

@ -261,11 +261,7 @@
#define LEN_VFSWRESET TR("\004", "\011")
#if defined(TELEMETRY_FRSKY)
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetr.")
#else
#define TR_FSW_RESET_TELEM
#endif
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetr.")
#if LCD_W >= 212
#define TR_FSW_RESET_TIMERS "Timer 1\0 ""Timer 2\0 ""Timer 3\0 "

View file

@ -262,11 +262,7 @@
#define LEN_VFSWRESET TR("\004", "\012")
#if defined(TELEMETRY_FRSKY)
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetrie")
#else
#define TR_FSW_RESET_TELEM
#endif
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetrie")
#if LCD_W >= 212
#define TR_FSW_RESET_TIMERS "Timer 1\0 ""Timer 2\0 ""Timer 3\0 "

View file

@ -262,11 +262,7 @@
#define LEN_VFSWRESET TR("\004", "\011") /*9 decimal*/
#if defined(TELEMETRY_FRSKY)
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetra")
#else
#define TR_FSW_RESET_TELEM
#endif
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetra")
#if LCD_W >= 212
#define TR_FSW_RESET_TIMERS "Timer 1\0 ""Timer 2\0 ""Timer 3\0 "

View file

@ -258,11 +258,7 @@
#define LEN_VFSWRESET TR("\004", "\011")
#if defined(TELEMETRY_FRSKY)
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetry")
#else
#define TR_FSW_RESET_TELEM
#endif
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetry")
#if defined(PCBTARANIS)
#define TR_FSW_RESET_TIMERS "Timer 1\0 ""Timer 2\0 ""Timer 3\0 "

View file

@ -259,11 +259,7 @@
#define LEN_VFSWRESET TR("\004", "\011")
#if defined(TELEMETRY_FRSKY)
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetry")
#else
#define TR_FSW_RESET_TELEM
#endif
#define TR_FSW_RESET_TELEM TR("Telm", "Telemetry")
#if defined(PCBTARANIS)
#define TR_FSW_RESET_TIMERS "Timer 1\0 ""Timer 2\0 ""Timer 3\0 "