diff --git a/radio/src/gui/128x64/model_setup.cpp b/radio/src/gui/128x64/model_setup.cpp index 726e3ea96..5d69b77a6 100644 --- a/radio/src/gui/128x64/model_setup.cpp +++ b/radio/src/gui/128x64/model_setup.cpp @@ -27,6 +27,10 @@ #include "storage/modelslist.h" #endif +#if defined(CROSSFIRE) + #include "telemetry/crossfire.h" +#endif + // TODO find why we need this (for REGISTER at least) #if defined(PCBXLITE) #define EVT_BUTTON_PRESSED() EVT_KEY_FIRST(KEY_ENTER) diff --git a/radio/src/gui/212x64/model_setup.cpp b/radio/src/gui/212x64/model_setup.cpp index 27e476377..7a74c5220 100644 --- a/radio/src/gui/212x64/model_setup.cpp +++ b/radio/src/gui/212x64/model_setup.cpp @@ -22,6 +22,10 @@ #include "opentx.h" #include "mixer_scheduler.h" +#if defined(CROSSFIRE) + #include "telemetry/crossfire.h" +#endif + uint8_t g_moduleIdx; uint8_t getSwitchWarningsCount() diff --git a/radio/src/gui/colorlcd/bind_menu_d16.cpp b/radio/src/gui/colorlcd/bind_menu_d16.cpp index 12b897dad..1c8b8dddd 100644 --- a/radio/src/gui/colorlcd/bind_menu_d16.cpp +++ b/radio/src/gui/colorlcd/bind_menu_d16.cpp @@ -22,6 +22,10 @@ #include "bind_menu_d16.h" #include "opentx.h" +#if defined(MULTIMODULE) + #include "telemetry/multi.h" +#endif + BindChoiceMenu::BindChoiceMenu(Window *parent, uint8_t moduleIdx, std::function onPress, std::function onCancel) : @@ -68,11 +72,14 @@ void BindChoiceMenu::onSelect(BindChanMode mode) } ModuleData* md = &g_model.moduleData[moduleIdx]; +#if defined(MULTIMODULE) if (isModuleMultimodule(moduleIdx)) { md->multi.receiverTelemetryOff = !receiverTelemetry; md->multi.receiverHigherChannels = receiverHigherChannels; setMultiBindStatus(moduleIdx, MULTI_BIND_INITIATED); - } else { + } else +#endif + { md->pxx.receiverTelemetryOff = !receiverTelemetry; md->pxx.receiverHigherChannels = receiverHigherChannels; } diff --git a/radio/src/gui/colorlcd/crossfire_settings.cpp b/radio/src/gui/colorlcd/crossfire_settings.cpp index 1ea5d1321..482623dba 100644 --- a/radio/src/gui/colorlcd/crossfire_settings.cpp +++ b/radio/src/gui/colorlcd/crossfire_settings.cpp @@ -24,6 +24,8 @@ #include "mixer_scheduler.h" +#include "telemetry/crossfire.h" + #define SET_DIRTY() storageDirty(EE_MODEL) CrossfireSettings::CrossfireSettings(Window* parent, const FlexGridLayout& g, diff --git a/radio/src/gui/colorlcd/hw_intmodule.cpp b/radio/src/gui/colorlcd/hw_intmodule.cpp index 2ee17b094..9e62d2117 100644 --- a/radio/src/gui/colorlcd/hw_intmodule.cpp +++ b/radio/src/gui/colorlcd/hw_intmodule.cpp @@ -22,6 +22,10 @@ #include "hw_intmodule.h" #include "opentx.h" +#if defined(CROSSFIRE) + #include "telemetry/crossfire.h" +#endif + #define SET_DIRTY() storageDirty(EE_GENERAL) static const lv_coord_t col_dsc[] = {LV_GRID_FR(1), LV_GRID_FR(3), @@ -77,6 +81,7 @@ void InternalModuleWindow::setModuleType(int moduleType) SET_DIRTY(); } +#if defined(CROSSFIRE) int InternalModuleWindow::getBaudrate() { return CROSSFIRE_STORE_TO_INDEX(g_eeGeneral.internalModuleBaudrate); @@ -88,6 +93,7 @@ void InternalModuleWindow::setBaudrate(int val) restartModule(INTERNAL_MODULE); SET_DIRTY(); } +#endif void InternalModuleWindow::updateBaudrateLine() { diff --git a/radio/src/gui/colorlcd/hw_intmodule.h b/radio/src/gui/colorlcd/hw_intmodule.h index b41975b25..e55a65a31 100644 --- a/radio/src/gui/colorlcd/hw_intmodule.h +++ b/radio/src/gui/colorlcd/hw_intmodule.h @@ -32,8 +32,10 @@ class InternalModuleWindow : public FormGroup::Line uint8_t lastModule = 0; lv_obj_t* br_box = nullptr; +#if defined(CROSSFIRE) static int getBaudrate(); static void setBaudrate(int val); +#endif void setModuleType(int moduleType); void updateBaudrateLine(); diff --git a/radio/src/gui/colorlcd/module_setup.cpp b/radio/src/gui/colorlcd/module_setup.cpp index 83149b53a..fb3ca90ec 100644 --- a/radio/src/gui/colorlcd/module_setup.cpp +++ b/radio/src/gui/colorlcd/module_setup.cpp @@ -37,6 +37,7 @@ #endif #if defined(CROSSFIRE) +#include "telemetry/crossfire.h" #include "crossfire_settings.h" #endif @@ -196,9 +197,11 @@ void ModuleWindow::updateModule() GET_DEFAULT(*modelId), [=](int32_t newValue) { if (newValue != *modelId) { *modelId = newValue; +#if defined(CROSSFIRE) if (isModuleCrossfire(moduleIdx)) { moduleState[moduleIdx].counter = CRSF_FRAME_MODELID; } +#endif SET_DIRTY(); } }); @@ -566,6 +569,7 @@ void ModuleSubTypeChoice::update() void ModuleSubTypeChoice::openMenu() { +#if defined(MULTIMODULE) if (isModuleMultimodule(moduleIdx)) { auto menu = new Menu(this); @@ -587,7 +591,9 @@ void ModuleSubTypeChoice::openMenu() ModuleData* md = &g_model.moduleData[moduleIdx]; int idx = protos->getIndex(md->multi.rfProtocol); if (idx >= 0) menu->select(idx); - } else { + } else +#endif + { Choice::openMenu(); } } diff --git a/radio/src/gui/colorlcd/radio_ghost_module_config.cpp b/radio/src/gui/colorlcd/radio_ghost_module_config.cpp index 45d4aa16a..b0d0547b3 100644 --- a/radio/src/gui/colorlcd/radio_ghost_module_config.cpp +++ b/radio/src/gui/colorlcd/radio_ghost_module_config.cpp @@ -23,6 +23,9 @@ #include "radio_ghost_module_config.h" #include "libopenui.h" +#include "telemetry/ghost.h" +#include "telemetry/ghost_menu.h" + class GhostModuleConfigWindow: public Window { public: diff --git a/radio/src/gui/common/stdlcd/radio_ghost_menu.cpp b/radio/src/gui/common/stdlcd/radio_ghost_menu.cpp index 80e695636..8bf9cdf89 100644 --- a/radio/src/gui/common/stdlcd/radio_ghost_menu.cpp +++ b/radio/src/gui/common/stdlcd/radio_ghost_menu.cpp @@ -21,6 +21,10 @@ #include "opentx.h" +#if defined(GHOST) + #include "telemetry/ghost.h" +#endif + void menuGhostModuleConfig(event_t event) { switch (event) { diff --git a/radio/src/gui/common/stdlcd/radio_hardware.cpp b/radio/src/gui/common/stdlcd/radio_hardware.cpp index 48ef88dec..8ae02971d 100644 --- a/radio/src/gui/common/stdlcd/radio_hardware.cpp +++ b/radio/src/gui/common/stdlcd/radio_hardware.cpp @@ -23,6 +23,10 @@ #include "hal/adc_driver.h" #include "aux_serial_driver.h" +#if defined(CROSSFIRE) + #include "telemetry/crossfire.h" +#endif + #if defined(PCBTARANIS) enum { ITEM_RADIO_HARDWARE_LABEL_STICKS, diff --git a/radio/src/lua/api_general.cpp b/radio/src/lua/api_general.cpp index ffac2cc37..fc0abe1e8 100644 --- a/radio/src/lua/api_general.cpp +++ b/radio/src/lua/api_general.cpp @@ -25,8 +25,6 @@ #include "stamp.h" #include "lua_api.h" #include "api_filesystem.h" -#include "telemetry/frsky.h" -#include "telemetry/multi.h" #include "aux_serial_driver.h" #if defined(LIBOPENUI) @@ -77,6 +75,20 @@ #include "lua/lua_exports_nv14.inc" #endif +#include "telemetry/frsky.h" + +#if defined(MULTIMODULE) + #include "telemetry/multi.h" +#endif + +#if defined(CROSSFIRE) + #include "telemetry/crossfire.h" +#endif + +#if defined(GHOST) + #include "telemetry/ghost.h" +#endif + #if defined(SIMU) #define RADIO_VERSION FLAVOUR "-simu" #else diff --git a/radio/src/opentx.h b/radio/src/opentx.h index 84bb2c9cf..dad366ce7 100644 --- a/radio/src/opentx.h +++ b/radio/src/opentx.h @@ -904,6 +904,10 @@ constexpr uint8_t SD_SCREEN_FILE_LENGTH = 64; constexpr uint8_t TEXT_FILENAME_MAXLEN = 40; +#if defined(GHOST) + #include "telemetry/ghost_menu.h" +#endif + union ReusableBuffer { struct { diff --git a/radio/src/pulses/crossfire.cpp b/radio/src/pulses/crossfire.cpp index a38cfad80..5bdb32707 100644 --- a/radio/src/pulses/crossfire.cpp +++ b/radio/src/pulses/crossfire.cpp @@ -27,6 +27,8 @@ #include "intmodule_serial_driver.h" #endif +#include "telemetry/crossfire.h" + #define CROSSFIRE_CH_BITS 11 #define CROSSFIRE_CENTER 0x3E0 #if defined(PPM_CENTER_ADJUSTABLE) diff --git a/radio/src/pulses/ghost.cpp b/radio/src/pulses/ghost.cpp index 641c647e8..bc8c5c228 100755 --- a/radio/src/pulses/ghost.cpp +++ b/radio/src/pulses/ghost.cpp @@ -20,6 +20,8 @@ */ #include "opentx.h" +#include "telemetry/ghost.h" +#include "telemetry/ghost_menu.h" uint8_t createGhostMenuControlFrame(uint8_t * frame, int16_t * pulses) { diff --git a/radio/src/pulses/pulses.cpp b/radio/src/pulses/pulses.cpp index 42965e403..60980dbde 100755 --- a/radio/src/pulses/pulses.cpp +++ b/radio/src/pulses/pulses.cpp @@ -40,6 +40,10 @@ #include "pulses/crossfire.h" #endif +#if defined(GHOST) +#include "telemetry/ghost.h" +#endif + #if defined(MULTIMODULE) #include "io/multi_protolist.h" #include "pulses/multi.h" @@ -388,14 +392,14 @@ static void enablePulsesInternalModule(uint8_t protocol) break; #endif -#if defined(INTERNAL_MODULE_MULTI) +#if defined(INTERNAL_MODULE_MULTI) && defined(MULTIMODULE) case PROTOCOL_CHANNELS_MULTIMODULE: internalModuleContext = MultiInternalDriver.init(INTERNAL_MODULE); internalModuleDriver = &MultiInternalDriver; break; #endif -#if defined(INTERNAL_MODULE_CRSF) +#if defined(INTERNAL_MODULE_CRSF) && defined(CROSSFIRE) case PROTOCOL_CHANNELS_CROSSFIRE: internalModuleContext = CrossfireInternalDriver.init(INTERNAL_MODULE); internalModuleDriver = &CrossfireInternalDriver; @@ -409,7 +413,7 @@ static void enablePulsesInternalModule(uint8_t protocol) break; #endif -#if defined(INTERNAL_MODULE_AFHDS2A) +#if defined(INTERNAL_MODULE_AFHDS2A) && defined(AFHDS2A) case PROTOCOL_CHANNELS_AFHDS2A: internalModuleContext = Afhds2InternalDriver.init(INTERNAL_MODULE); internalModuleDriver = &Afhds2InternalDriver; diff --git a/radio/src/serial.cpp b/radio/src/serial.cpp index da2e67c95..fb2387db5 100644 --- a/radio/src/serial.cpp +++ b/radio/src/serial.cpp @@ -37,6 +37,10 @@ #include "dataconstants.h" #endif +#if defined(CROSSFIRE) + #include "telemetry/crossfire.h" +#endif + #define PRINTF_BUFFER_SIZE 128 static void (*dbg_serial_putc)(void*, uint8_t) = nullptr; diff --git a/radio/src/targets/common/arm/CMakeLists.txt b/radio/src/targets/common/arm/CMakeLists.txt index 162793084..0c6fd3491 100644 --- a/radio/src/targets/common/arm/CMakeLists.txt +++ b/radio/src/targets/common/arm/CMakeLists.txt @@ -211,7 +211,7 @@ endif() if(MULTIMODULE) add_definitions(-DMULTIMODULE) - set(SRC ${SRC} pulses/multi.cpp telemetry/spektrum.cpp telemetry/hitec.cpp telemetry/hott.cpp telemetry/mlink.cpp telemetry/multi.cpp io/multi_firmware_update.cpp) + set(SRC ${SRC} pulses/multi.cpp telemetry/hitec.cpp telemetry/hott.cpp telemetry/mlink.cpp telemetry/multi.cpp io/multi_firmware_update.cpp) endif() if(MULTIMODULE OR AFHDS3) set(SRC ${SRC} telemetry/flysky_ibus.cpp) @@ -286,6 +286,7 @@ set(SRC telemetry/frsky_d.cpp telemetry/frsky_sport.cpp telemetry/frsky_pxx2.cpp + telemetry/spektrum.cpp crc.cpp vario.cpp ) diff --git a/radio/src/targets/horus/telemetry_driver.cpp b/radio/src/targets/horus/telemetry_driver.cpp index 0f48fe80b..ac249ce9c 100644 --- a/radio/src/targets/horus/telemetry_driver.cpp +++ b/radio/src/targets/horus/telemetry_driver.cpp @@ -24,6 +24,10 @@ #include "fifo.h" #include "dmafifo.h" +#if defined(GHOST) + #include "telemetry/ghost.h" +#endif + Fifo telemetryNoDMAFifo; uint32_t telemetryErrors = 0; diff --git a/radio/src/targets/taranis/telemetry_driver.cpp b/radio/src/targets/taranis/telemetry_driver.cpp index a3154bfc8..1fbace107 100644 --- a/radio/src/targets/taranis/telemetry_driver.cpp +++ b/radio/src/targets/taranis/telemetry_driver.cpp @@ -22,6 +22,10 @@ #include "board.h" #include "opentx.h" +#if defined(GHOST) + #include "telemetry/ghost.h" +#endif + Fifo telemetryFifo; uint32_t telemetryErrors = 0; diff --git a/radio/src/telemetry/crossfire.cpp b/radio/src/telemetry/crossfire.cpp index 3deb3319c..7605c4a44 100644 --- a/radio/src/telemetry/crossfire.cpp +++ b/radio/src/telemetry/crossfire.cpp @@ -19,6 +19,8 @@ * GNU General Public License for more details. */ +#include "crossfire.h" + #include "opentx.h" #include "aux_serial_driver.h" diff --git a/radio/src/telemetry/ghost.cpp b/radio/src/telemetry/ghost.cpp index 2b12768c1..381e4c550 100755 --- a/radio/src/telemetry/ghost.cpp +++ b/radio/src/telemetry/ghost.cpp @@ -19,6 +19,9 @@ * GNU General Public License for more details. */ +#include "ghost.h" +#include "ghost_menu.h" + #include "opentx.h" #include "aux_serial_driver.h" diff --git a/radio/src/telemetry/ghost.h b/radio/src/telemetry/ghost.h index 870eb765e..81485fdc8 100755 --- a/radio/src/telemetry/ghost.h +++ b/radio/src/telemetry/ghost.h @@ -165,27 +165,3 @@ enum GhostFrames GHST_MENU_CONTROL }; -constexpr uint8_t GHST_MENU_LINES = 6; -constexpr uint8_t GHST_MENU_CHARS = 20; - -// GHST_DL_MENU_DESC (27 bytes) -struct GhostMenuFrame -{ - uint8_t address; - uint8_t length ; - uint8_t packetId; - uint8_t menuStatus; // GhostMenuStatus - uint8_t lineFlags; // GhostLineFlags - uint8_t lineIndex; // 0 = first line - unsigned char menuText[GHST_MENU_CHARS]; - uint8_t crc; -}; - -struct GhostMenuData -{ - uint8_t menuStatus; // Update Line, Clear Menu, etc. - uint8_t lineFlags; // Carat states, Inverse, Bold for each of Menu Label, and Value - uint8_t splitLine; // Store beginning of Value substring - char menuText[GHST_MENU_CHARS + 1]; -}; - diff --git a/radio/src/telemetry/ghost_menu.h b/radio/src/telemetry/ghost_menu.h new file mode 100644 index 000000000..01d82f694 --- /dev/null +++ b/radio/src/telemetry/ghost_menu.h @@ -0,0 +1,47 @@ +/* + * Copyright (C) EdgeTX + * + * Based on code named + * opentx - https://github.com/opentx/opentx + * th9x - http://code.google.com/p/th9x + * er9x - http://code.google.com/p/er9x + * gruvin9x - http://code.google.com/p/gruvin9x + * + * License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#pragma once + +#include + +constexpr uint8_t GHST_MENU_LINES = 6; +constexpr uint8_t GHST_MENU_CHARS = 20; + +// GHST_DL_MENU_DESC (27 bytes) +struct GhostMenuFrame +{ + uint8_t address; + uint8_t length ; + uint8_t packetId; + uint8_t menuStatus; // GhostMenuStatus + uint8_t lineFlags; // GhostLineFlags + uint8_t lineIndex; // 0 = first line + unsigned char menuText[GHST_MENU_CHARS]; + uint8_t crc; +}; + +struct GhostMenuData { + uint8_t menuStatus; // Update Line, Clear Menu, etc. + uint8_t lineFlags; // Carat states, Inverse, Bold for each of Menu Label, and Value + uint8_t splitLine; // Store beginning of Value substring + char menuText[GHST_MENU_CHARS + 1]; +}; diff --git a/radio/src/telemetry/mlink.cpp b/radio/src/telemetry/mlink.cpp index c2283128f..7f8101d7f 100644 --- a/radio/src/telemetry/mlink.cpp +++ b/radio/src/telemetry/mlink.cpp @@ -20,6 +20,7 @@ */ #include "opentx.h" +#include "mlink.h" struct MLinkSensor { diff --git a/radio/src/telemetry/multi.cpp b/radio/src/telemetry/multi.cpp index 553ad448d..82b15bf2c 100644 --- a/radio/src/telemetry/multi.cpp +++ b/radio/src/telemetry/multi.cpp @@ -19,11 +19,17 @@ * GNU General Public License for more details. */ #include "opentx.h" -#include "telemetry.h" -#include "multi.h" -#include "io/multi_protolist.h" #include "aux_serial_driver.h" +#include "telemetry.h" +#include "io/multi_protolist.h" +#include "multi.h" +#include "spektrum.h" +#include "flysky_ibus.h" +#include "hitec.h" +#include "hott.h" +#include "mlink.h" + constexpr int32_t MULTI_DESIRED_VERSION = (1 << 24) | (3 << 16) | (3 << 8) | 0; #define MULTI_CHAN_BITS 11 diff --git a/radio/src/telemetry/spektrum.cpp b/radio/src/telemetry/spektrum.cpp index f11503724..2b552203c 100644 --- a/radio/src/telemetry/spektrum.cpp +++ b/radio/src/telemetry/spektrum.cpp @@ -352,7 +352,7 @@ void processSpektrumPacket(const uint8_t *packet) uint8_t i2cAddress = (packet[2] & 0x7f); if (i2cAddress == I2C_FWD_PGM) { -#if defined(LUA) +#if defined(LUA) && defined(MULTIMODULE) // Forward Programming if (Multi_Buffer && memcmp(Multi_Buffer, "DSM", 3) == 0) { // Multi_Buffer[0..2]=="DSM" -> Lua script is running @@ -571,11 +571,14 @@ void processDSMBindPacket(uint8_t module, const uint8_t *packet) /* Finally stop binding as the rx just told us that it is bound */ if (getModuleMode(module) == MODULE_MODE_BIND) { auto module_type = g_model.moduleData[module].type; +#if defined(MULTIMODULE) if (module_type == MODULE_TYPE_MULTIMODULE && g_model.moduleData[module].multi.rfProtocol == MODULE_SUBTYPE_MULTI_DSM2) { setMultiBindStatus(module, MULTI_BIND_FINISHED); - } else if (module_type == MODULE_TYPE_LEMON_DSMP) { + } else +#endif + if (module_type == MODULE_TYPE_LEMON_DSMP) { setModuleMode(module, MODULE_MODE_NORMAL); } } diff --git a/radio/src/telemetry/telemetry.cpp b/radio/src/telemetry/telemetry.cpp index bd9a8e4cd..a749c5e89 100644 --- a/radio/src/telemetry/telemetry.cpp +++ b/radio/src/telemetry/telemetry.cpp @@ -36,6 +36,27 @@ #include #endif +#include "spektrum.h" + +#if defined(CROSSFIRE) + #include "crossfire.h" +#endif + +#if defined(GHOST) + #include "ghost.h" +#endif + +#if defined(MULTIMODULE) + #include "hitec.h" + #include "hott.h" + #include "multi.h" + #include "mlink.h" +#endif + +#if defined(MULTIMODULE) || defined(AFHDS2A) || defined(AFHDS3) + #include "flysky_ibus.h" +#endif + uint8_t telemetryStreaming = 0; uint8_t telemetryRxBuffer[TELEMETRY_RX_PACKET_SIZE]; // Receive buffer. 9 bytes (full packet), worst case 18 bytes with byte-stuffing (+1) uint8_t telemetryRxBufferCount = 0; diff --git a/radio/src/telemetry/telemetry.h b/radio/src/telemetry/telemetry.h index 5de3a658a..4b0403218 100644 --- a/radio/src/telemetry/telemetry.h +++ b/radio/src/telemetry/telemetry.h @@ -23,28 +23,13 @@ #define _TELEMETRY_H_ #include "dataconstants.h" -#include "frsky.h" -#include "io/frsky_sport.h" -#include "crossfire.h" #include "myeeprom.h" -#include "io/frsky_sport.h" -#if defined(GHOST) - #include "ghost.h" -#endif -#if defined(MULTIMODULE) - #include "spektrum.h" - #include "hitec.h" - #include "hott.h" - #include "multi.h" - #include "mlink.h" -#endif -#include "myeeprom.h" -#if defined(MULTIMODULE) || defined(AFHDS3) - #include "flysky_ibus.h" -#endif #include "pulses/modules_helpers.h" +#include "frsky.h" +#include "io/frsky_sport.h" + extern uint8_t telemetryStreaming; // >0 (true) == data is streaming in. 0 = no data detected for some time inline bool TELEMETRY_STREAMING() diff --git a/radio/src/telemetry/telemetry_sensors.cpp b/radio/src/telemetry/telemetry_sensors.cpp index 0a8f3dbbf..7a0f5d528 100644 --- a/radio/src/telemetry/telemetry_sensors.cpp +++ b/radio/src/telemetry/telemetry_sensors.cpp @@ -27,7 +27,30 @@ #include "libopenui.h" #endif -#include "telemetry/flysky_nv14.h" +#include "spektrum.h" + +#if defined(CROSSFIRE) + #include "crossfire.h" +#endif + +#if defined(GHOST) + #include "ghost.h" +#endif + +#if defined(PCBNV14) + #include "telemetry/flysky_nv14.h" +#endif + +#if defined(MULTIMODULE) + #include "hitec.h" + #include "hott.h" + #include "multi.h" + #include "mlink.h" +#endif + +#if defined(MULTIMODULE) || defined(AFHDS2A) || defined(AFHDS3) + #include "flysky_ibus.h" +#endif TelemetryItem telemetryItems[MAX_TELEMETRY_SENSORS]; uint8_t allowNewSensors; @@ -551,17 +574,17 @@ int setTelemetryValue(TelemetryProtocol protocol, uint16_t id, uint8_t subId, ui break; #endif -#if defined(AFHDS2) +#if defined(AFHDS2) && defined(PCBNV14) case PROTOCOL_TELEMETRY_FLYSKY_NV14: flySkyNv14SetDefault(index, id, subId, instance); break; #endif -#if defined(MULTIMODULE) case PROTOCOL_TELEMETRY_SPEKTRUM: spektrumSetDefault(index, id, subId, instance); break; +#if defined(MULTIMODULE) case PROTOCOL_TELEMETRY_HITEC: hitecSetDefault(index, id, subId, instance); break;