mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 16:25:16 +03:00
rename x3 to x9lite
This commit is contained in:
parent
9c04f564df
commit
e4e003b87a
48 changed files with 160 additions and 160 deletions
|
@ -23,7 +23,7 @@ env:
|
|||
# - FLAVOR=AR9X
|
||||
# - FLAVOR=SKY9X
|
||||
# - FLAVOR=9XRPRO
|
||||
- FLAVOR=X3
|
||||
- FLAVOR=X9LITE
|
||||
- FLAVOR=X7
|
||||
- FLAVOR=XLITE
|
||||
- FLAVOR=XLITES
|
||||
|
|
|
@ -99,7 +99,7 @@ const int Boards::getEEpromSize(Board::Type board)
|
|||
case BOARD_TARANIS_XLITES:
|
||||
case BOARD_TARANIS_XLITE:
|
||||
case BOARD_TARANIS_X7:
|
||||
case BOARD_TARANIS_X3:
|
||||
case BOARD_TARANIS_X9LITE:
|
||||
case BOARD_TARANIS_X9D:
|
||||
case BOARD_TARANIS_X9DP:
|
||||
case BOARD_TARANIS_X9E:
|
||||
|
@ -129,7 +129,7 @@ const int Boards::getFlashSize(Type board)
|
|||
case BOARD_TARANIS_XLITES:
|
||||
case BOARD_TARANIS_XLITE:
|
||||
case BOARD_TARANIS_X7:
|
||||
case BOARD_TARANIS_X3:
|
||||
case BOARD_TARANIS_X9LITE:
|
||||
case BOARD_TARANIS_X9D:
|
||||
case BOARD_TARANIS_X9DP:
|
||||
case BOARD_TARANIS_X9E:
|
||||
|
@ -231,7 +231,7 @@ const int Boards::getCapability(Board::Type board, Board::Capability capability)
|
|||
return 4;
|
||||
|
||||
case Pots:
|
||||
if (IS_TARANIS_X3(board))
|
||||
if (IS_TARANIS_X9LITE(board))
|
||||
return 1;
|
||||
else if (IS_TARANIS_SMALL(board))
|
||||
return 2;
|
||||
|
@ -278,7 +278,7 @@ const int Boards::getCapability(Board::Type board, Board::Capability capability)
|
|||
case Switches:
|
||||
if (IS_TARANIS_X9E(board))
|
||||
return 18;
|
||||
else if (IS_TARANIS_X3(board))
|
||||
else if (IS_TARANIS_X9LITE(board))
|
||||
return 5;
|
||||
else if (IS_TARANIS_X7(board))
|
||||
return 6;
|
||||
|
@ -451,7 +451,7 @@ const QString Boards::getBoardName(Board::Type board)
|
|||
return "Taranis X9D+";
|
||||
case BOARD_TARANIS_X9E:
|
||||
return "Taranis X9E";
|
||||
case BOARD_TARANIS_X3:
|
||||
case BOARD_TARANIS_X9LITE:
|
||||
return "Taranis X3";
|
||||
case BOARD_SKY9X:
|
||||
return "Sky9x";
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace Board {
|
|||
BOARD_X10,
|
||||
BOARD_TARANIS_XLITE,
|
||||
BOARD_TARANIS_XLITES,
|
||||
BOARD_TARANIS_X3,
|
||||
BOARD_TARANIS_X9LITE,
|
||||
BOARD_ENUM_COUNT
|
||||
};
|
||||
|
||||
|
@ -192,13 +192,13 @@ class Boards
|
|||
#define IS_TARANIS_XLITE(board) (board==Board::BOARD_TARANIS_XLITE || board==Board::BOARD_TARANIS_XLITES)
|
||||
#define IS_TARANIS_XLITES(board) (board==Board::BOARD_TARANIS_XLITES)
|
||||
#define IS_TARANIS_X7(board) (board==Board::BOARD_TARANIS_X7)
|
||||
#define IS_TARANIS_X3(board) (board==Board::BOARD_TARANIS_X3)
|
||||
#define IS_TARANIS_X9LITE(board) (board==Board::BOARD_TARANIS_X9LITE)
|
||||
#define IS_TARANIS_X9(board) (board==Board::BOARD_TARANIS_X9D || board==Board::BOARD_TARANIS_X9DP || board==Board::BOARD_TARANIS_X9E)
|
||||
#define IS_TARANIS_X9D(board) (board==Board::BOARD_TARANIS_X9D || board==Board::BOARD_TARANIS_X9DP)
|
||||
#define IS_TARANIS_PLUS(board) (board==Board::BOARD_TARANIS_X9DP || board==Board::BOARD_TARANIS_X9E)
|
||||
#define IS_TARANIS_X9E(board) (board==Board::BOARD_TARANIS_X9E)
|
||||
#define IS_TARANIS(board) (IS_TARANIS_X9(board) || IS_TARANIS_X7(board) || IS_TARANIS_X3(board) || IS_TARANIS_XLITE(board))
|
||||
#define IS_TARANIS_SMALL(board) (IS_TARANIS_X7(board) || IS_TARANIS_XLITE(board) || IS_TARANIS_X3(board))
|
||||
#define IS_TARANIS(board) (IS_TARANIS_X9(board) || IS_TARANIS_X7(board) || IS_TARANIS_X9LITE(board) || IS_TARANIS_XLITE(board))
|
||||
#define IS_TARANIS_SMALL(board) (IS_TARANIS_X7(board) || IS_TARANIS_XLITE(board) || IS_TARANIS_X9LITE(board))
|
||||
#define IS_HORUS_X12S(board) (board==Board::BOARD_X12S)
|
||||
#define IS_HORUS_X10(board) (board==Board::BOARD_X10)
|
||||
#define IS_HORUS(board) (IS_HORUS_X12S(board) || IS_HORUS_X10(board))
|
||||
|
|
|
@ -74,7 +74,7 @@ const char * OpenTxEepromInterface::getName()
|
|||
return "OpenTX for FrSky Taranis X9E";
|
||||
case BOARD_TARANIS_X7:
|
||||
return "OpenTX for FrSky Taranis X7";
|
||||
case BOARD_TARANIS_X3:
|
||||
case BOARD_TARANIS_X9LITE:
|
||||
return "OpenTX for FrSky Taranis X3";
|
||||
case BOARD_TARANIS_XLITE:
|
||||
return "OpenTX for FrSky Taranis X-Lite";
|
||||
|
@ -318,7 +318,7 @@ int OpenTxEepromInterface::save(uint8_t * eeprom, const RadioData & radioData, u
|
|||
else if (IS_TARANIS_X9E(board)) {
|
||||
variant |= TARANIS_X9E_VARIANT;
|
||||
}
|
||||
else if (IS_TARANIS_X3(board)) {
|
||||
else if (IS_TARANIS_X9LITE(board)) {
|
||||
variant |= TARANIS_X3_VARIANT;
|
||||
}
|
||||
else if (IS_TARANIS_X7(board)) {
|
||||
|
@ -699,7 +699,7 @@ int OpenTxFirmware::getCapability(::Capability capability)
|
|||
return SIMU_M128_VARIANTS;
|
||||
else if (IS_TARANIS_X9E(board))
|
||||
return TARANIS_X9E_VARIANT;
|
||||
else if (IS_TARANIS_X3(board))
|
||||
else if (IS_TARANIS_X9LITE(board))
|
||||
return TARANIS_X3_VARIANT;
|
||||
else if (IS_TARANIS_X7(board))
|
||||
return TARANIS_X7_VARIANT;
|
||||
|
@ -754,13 +754,13 @@ int OpenTxFirmware::isAvailable(PulsesProtocol proto, int port)
|
|||
return 1;
|
||||
case PULSES_PXX_XJT_X16:
|
||||
case PULSES_PXX_XJT_LR12:
|
||||
return (IS_TARANIS_XLITES(board) || IS_TARANIS_X3(board)) ? 0 : 1;
|
||||
return (IS_TARANIS_XLITES(board) || IS_TARANIS_X9LITE(board)) ? 0 : 1;
|
||||
case PULSES_PXX_XJT_D8:
|
||||
return (IS_TARANIS_XLITES(board) || IS_TARANIS_X3(board) || id.contains("eu")) ? 0 : 1;
|
||||
return (IS_TARANIS_XLITES(board) || IS_TARANIS_X9LITE(board) || id.contains("eu")) ? 0 : 1;
|
||||
case PULSES_PPM:
|
||||
return id.contains("internalppm") ? 1 : 0;
|
||||
case PULSES_ACCESS_ISRM:
|
||||
return (IS_TARANIS_XLITES(board) || IS_TARANIS_X3(board)) ? 1 : 0;
|
||||
return (IS_TARANIS_XLITES(board) || IS_TARANIS_X9LITE(board)) ? 1 : 0;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
@ -773,7 +773,7 @@ int OpenTxFirmware::isAvailable(PulsesProtocol proto, int port)
|
|||
case PULSES_PXX_XJT_X16:
|
||||
case PULSES_PXX_XJT_D8:
|
||||
case PULSES_PXX_XJT_LR12:
|
||||
return (IS_TARANIS_XLITES(board) || IS_TARANIS_X3(board)) ? 0 : 1;
|
||||
return (IS_TARANIS_XLITES(board) || IS_TARANIS_X9LITE(board)) ? 0 : 1;
|
||||
case PULSES_PXX_R9M:
|
||||
case PULSES_LP45:
|
||||
case PULSES_DSM2:
|
||||
|
@ -785,7 +785,7 @@ int OpenTxFirmware::isAvailable(PulsesProtocol proto, int port)
|
|||
return id.contains("multimodule") ? 1 : 0;
|
||||
case PULSES_ACCESS_R9M_LITE:
|
||||
case PULSES_ACCESS_R9M_LITE_PRO:
|
||||
return (IS_TARANIS_XLITES(board) || IS_TARANIS_X3(board)) ? 1 : 0;
|
||||
return (IS_TARANIS_XLITES(board) || IS_TARANIS_X9LITE(board)) ? 1 : 0;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
|
@ -1189,7 +1189,7 @@ void registerOpenTxFirmwares()
|
|||
registerOpenTxFirmware(firmware);
|
||||
|
||||
/* FrSky X3 board */
|
||||
firmware = new OpenTxFirmware("opentx-x3", Firmware::tr("FrSky Taranis X3"), BOARD_TARANIS_X3);
|
||||
firmware = new OpenTxFirmware("opentx-x3", Firmware::tr("FrSky Taranis X3"), BOARD_TARANIS_X9LITE);
|
||||
addOpenTxTaranisOptions(firmware, false);
|
||||
registerOpenTxFirmware(firmware);
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ set(simulation_SRCS
|
|||
radiooutputswidget.cpp
|
||||
simulateduiwidget.cpp
|
||||
simulateduiwidget9X.cpp
|
||||
simulateduiwidgetX3.cpp
|
||||
simulateduiwidgetX9LITE.cpp
|
||||
simulateduiwidgetX7.cpp
|
||||
simulateduiwidgetX9.cpp
|
||||
simulateduiwidgetXLITE.cpp
|
||||
|
@ -25,7 +25,7 @@ set(simulation_UIS
|
|||
debugoutput.ui
|
||||
radiooutputswidget.ui
|
||||
simulateduiwidget9X.ui
|
||||
simulateduiwidgetX3.ui
|
||||
simulateduiwidgetX9LITE.ui
|
||||
simulateduiwidgetX7.ui
|
||||
simulateduiwidgetX9.ui
|
||||
simulateduiwidgetXLITE.ui
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "simulateduiwidget.h"
|
||||
#include "ui_simulateduiwidgetX3.h"
|
||||
#include "ui_simulateduiwidgetX9LITE.h"
|
||||
|
||||
// NOTE: RadioUiAction(NUMBER,...): NUMBER relates to enum EnumKeys in the specific board.h
|
||||
|
|
@ -68,7 +68,7 @@ SimulatorWidget::SimulatorWidget(QWidget * parent, SimulatorInterface * simulato
|
|||
setWindowTitle(windowName);
|
||||
|
||||
switch(m_board) {
|
||||
case Board::BOARD_TARANIS_X3:
|
||||
case Board::BOARD_TARANIS_X9LITE:
|
||||
radioUiWidget = new SimulatedUIWidgetX3(simulator, this);
|
||||
break;
|
||||
case Board::BOARD_TARANIS_X7:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
include(CMakeForceCompiler)
|
||||
include(Bitmaps)
|
||||
|
||||
set(PCB_TYPES X3 X7 XLITE XLITES X9D X9D+ X9E X10 X12S SKY9X 9XRPRO AR9X)
|
||||
set(PCB_TYPES X9LITE X7 XLITE XLITES X9D X9D+ X9E X10 X12S SKY9X 9XRPRO AR9X)
|
||||
set(GUI_LANGUAGES CZ DE EN ES FR IT PT SK SE PL HU NL)
|
||||
set(TTS_LANGUAGES CZ DE EN ES FR IT PT SK SE PL HU NL RU)
|
||||
|
||||
|
@ -82,7 +82,7 @@ set(FATFS_SRC
|
|||
|
||||
if(PCB STREQUAL X12S OR PCB STREQUAL X10)
|
||||
include(targets/horus/CMakeLists.txt)
|
||||
elseif(PCB STREQUAL X9E OR PCB STREQUAL X9D+ OR PCB STREQUAL X9D OR PCB STREQUAL X7 OR PCB STREQUAL X3 OR PCB STREQUAL XLITE OR PCB STREQUAL XLITES)
|
||||
elseif(PCB STREQUAL X9E OR PCB STREQUAL X9D+ OR PCB STREQUAL X9D OR PCB STREQUAL X7 OR PCB STREQUAL X9LITE OR PCB STREQUAL XLITE OR PCB STREQUAL XLITES)
|
||||
include(targets/taranis/CMakeLists.txt)
|
||||
elseif(PCB STREQUAL SKY9X OR PCB STREQUAL 9XRPRO OR PCB STREQUAL AR9X)
|
||||
include(targets/sky9x/CMakeLists.txt)
|
||||
|
@ -451,7 +451,7 @@ if(NOT MSVC)
|
|||
set(SRC ${SRC} bin_allocator.cpp)
|
||||
endif()
|
||||
|
||||
if(PCB STREQUAL XLITE OR PCB STREQUAL XLITES OR PCB STREQUAL X9D OR PCB STREQUAL X9D+ OR PCB STREQUAL X9E OR PCB STREQUAL X7 OR PCB STREQUAL X3 OR PCB STREQUAL X10 OR PCB STREQUAL X12S)
|
||||
if(PCB STREQUAL XLITE OR PCB STREQUAL XLITES OR PCB STREQUAL X9D OR PCB STREQUAL X9D+ OR PCB STREQUAL X9E OR PCB STREQUAL X7 OR PCB STREQUAL X9LITE OR PCB STREQUAL X10 OR PCB STREQUAL X12S)
|
||||
add_subdirectory(targets/common/arm/stm32/bootloader)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/targets/common/arm/stm32/bootloader)
|
||||
set(FIRMWARE_DEPENDENCIES ${FIRMWARE_DEPENDENCIES} bootloader)
|
||||
|
|
|
@ -568,7 +568,7 @@ enum MixSources {
|
|||
MIXSRC_POT1 = MIXSRC_FIRST_POT, LUA_EXPORT("s1", "Potentiometer 1")
|
||||
MIXSRC_POT2, LUA_EXPORT("s2", "Potentiometer 2")
|
||||
MIXSRC_LAST_POT = MIXSRC_POT2,
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
MIXSRC_POT1 = MIXSRC_FIRST_POT, LUA_EXPORT("s1", "Potentiometer 1")
|
||||
MIXSRC_LAST_POT = MIXSRC_POT1,
|
||||
#elif defined(PCBTARANIS)
|
||||
|
|
|
@ -828,7 +828,7 @@ static inline void check_struct()
|
|||
|
||||
CHKSIZE(VarioData, 5);
|
||||
|
||||
#if defined(PCBX7) || defined(PCBXLITE) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBXLITE) || defined(PCBX9LITE)
|
||||
CHKSIZE(MixData, 20);
|
||||
CHKSIZE(ExpoData, 17);
|
||||
CHKSIZE(LimitData, 11);
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
|
||||
#define MENUS_SCROLLBAR_WIDTH 0
|
||||
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
#define HEADER_LINE 0
|
||||
#define HEADER_LINE_COLUMNS
|
||||
#else
|
||||
|
@ -156,7 +156,7 @@ void title(const char * s);
|
|||
|
||||
#define MENU_TAB(...) const uint8_t mstate_tab[] = __VA_ARGS__
|
||||
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
#define MENU_CHECK(tab, menu, lines_count) \
|
||||
check(event, menu, tab, DIM(tab), mstate_tab, DIM(mstate_tab)-1, lines_count)
|
||||
#else
|
||||
|
@ -169,7 +169,7 @@ void title(const char * s);
|
|||
MENU_CHECK(tab, menu, lines_count); \
|
||||
TITLE(title)
|
||||
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
#define SIMPLE_MENU_NOTITLE(tab, menu, lines_count) \
|
||||
check_simple(event, menu, tab, DIM(tab), lines_count);
|
||||
#define SUBMENU_NOTITLE(lines_count, ...) \
|
||||
|
@ -289,7 +289,7 @@ void readModelNotes();
|
|||
#endif
|
||||
|
||||
// TODO enum
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
#define EDIT_MODE_INIT 0
|
||||
#else
|
||||
#define EDIT_MODE_INIT -1
|
||||
|
|
|
@ -198,7 +198,7 @@ void menuModelSelect(event_t event)
|
|||
}
|
||||
break;
|
||||
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
case EVT_KEY_LONG(KEY_PAGE):
|
||||
chainMenu(menuTabModel[DIM(menuTabModel)-1]);
|
||||
killEvents(event);
|
||||
|
@ -230,7 +230,7 @@ void menuModelSelect(event_t event)
|
|||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
case EVT_ROTARY_LEFT:
|
||||
case EVT_ROTARY_RIGHT:
|
||||
#endif
|
||||
|
@ -271,7 +271,7 @@ void menuModelSelect(event_t event)
|
|||
lcdDrawNumber(17*FW, 0, reusableBuffer.modelsel.eepromfree, RIGHT);
|
||||
#endif
|
||||
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
drawScreenIndex(MENU_MODEL_SELECT, DIM(menuTabModel), 0);
|
||||
#elif defined(ROTARY_ENCODER_NAVIGATION)
|
||||
drawScreenIndex(MENU_MODEL_SELECT, DIM(menuTabModel), (sub == g_eeGeneral.currModel) ? ((IS_ROTARY_ENCODER_NAVIGATION_ENABLE() && s_editMode < 0) ? INVERS|BLINK : INVERS) : 0);
|
||||
|
|
|
@ -126,7 +126,7 @@ enum MenuModelSetupItems {
|
|||
ITEM_MODEL_TRAINER_LABEL,
|
||||
ITEM_MODEL_TRAINER_MODE,
|
||||
#endif
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
#if defined(BLUETOOTH)
|
||||
ITEM_MODEL_TRAINER_BLUETOOTH,
|
||||
#endif
|
||||
|
@ -195,7 +195,7 @@ enum MenuModelSetupItems {
|
|||
#define EXTRA_MODULE_ROWS
|
||||
#endif
|
||||
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
#define ANTENNA_ROW
|
||||
#if defined(BLUETOOTH)
|
||||
#define TRAINER_BLUETOOTH_M_ROW ((bluetooth.distantAddr[0] == '\0' || bluetooth.state == BLUETOOTH_STATE_CONNECTED) ? (uint8_t)0 : (uint8_t)1)
|
||||
|
@ -1281,7 +1281,7 @@ void menuModelSetup(event_t event)
|
|||
break;
|
||||
}
|
||||
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
case ITEM_MODEL_TRAINER_PARAMS:
|
||||
lcdDrawTextAlignedLeft(y, STR_PPMFRAME);
|
||||
lcdDrawText(MODEL_SETUP_2ND_COLUMN+3*FW, y, STR_MS);
|
||||
|
|
|
@ -388,7 +388,7 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
|
|||
else if (attr) {
|
||||
REPEAT_LAST_CURSOR_MOVE();
|
||||
}
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
if (active || event==EVT_KEY_LONG(KEY_ENTER)) {
|
||||
CFN_PARAM(cfn) = CHECK_INCDEC_PARAM(event, val_displayed, val_min, val_max);
|
||||
if (func == FUNC_ADJUST_GVAR && attr && event==EVT_KEY_LONG(KEY_ENTER)) {
|
||||
|
@ -435,7 +435,7 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
|
|||
break;
|
||||
}
|
||||
}
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
if (sub==k && menuHorizontalPosition<0 && CFN_SWITCH(cfn)) {
|
||||
lcdInvertLine(i+1);
|
||||
}
|
||||
|
@ -445,7 +445,7 @@ void menuSpecialFunctions(event_t event, CustomFunctionData * functions, CustomF
|
|||
|
||||
void menuModelSpecialFunctions(event_t event)
|
||||
{
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
const CustomFunctionData * cfn = &g_model.customFn[menuVerticalPosition];
|
||||
if (!CFN_SWITCH(cfn) && menuHorizontalPosition < 0 && event==EVT_KEY_BREAK(KEY_ENTER)) {
|
||||
menuHorizontalPosition = 0;
|
||||
|
@ -455,7 +455,7 @@ void menuModelSpecialFunctions(event_t event)
|
|||
|
||||
menuSpecialFunctions(event, g_model.customFn, &modelFunctionsContext);
|
||||
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
if (!CFN_SWITCH(cfn) && menuHorizontalPosition == 0 && s_editMode <= 0) {
|
||||
menuHorizontalPosition = -1;
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ void menuRadioDiagKeys(event_t event)
|
|||
}
|
||||
|
||||
if (i < TRM_BASE) {
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
y = MENU_HEADER_HEIGHT + FH + FH*i;
|
||||
if (i >= 2) {
|
||||
// hide PLUS and MINUS virtual buttons
|
||||
|
@ -86,7 +86,7 @@ void menuRadioDiagKeys(event_t event)
|
|||
}
|
||||
|
||||
#if defined(ROTARY_ENCODER_NAVIGATION)
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
coord_t y = MENU_HEADER_HEIGHT + FH;
|
||||
coord_t x = 6*FW+3;
|
||||
lcdDrawTextAtIndex(0, MENU_HEADER_HEIGHT + FH , STR_VRENCODERS, 0, 0);
|
||||
|
|
|
@ -96,7 +96,7 @@ enum MenuRadioHardwareItems {
|
|||
ITEM_RADIO_HARDWARE_STICK4,
|
||||
ITEM_RADIO_HARDWARE_LABEL_POTS,
|
||||
ITEM_RADIO_HARDWARE_POT1,
|
||||
#if !defined(PCBX3)
|
||||
#if !defined(PCBX9LITE)
|
||||
ITEM_RADIO_HARDWARE_POT2,
|
||||
#endif
|
||||
ITEM_RADIO_HARDWARE_LABEL_SWITCHES,
|
||||
|
@ -136,7 +136,7 @@ enum MenuRadioHardwareItems {
|
|||
ITEM_RADIO_HARDWARE_MAX
|
||||
};
|
||||
|
||||
#if defined(PCBX3)
|
||||
#if defined(PCBX9LITE)
|
||||
#define POTS_ROWS NAVIGATION_LINE_BY_LINE|1
|
||||
#else
|
||||
#define POTS_ROWS NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1
|
||||
|
@ -150,7 +150,7 @@ enum MenuRadioHardwareItems {
|
|||
#define SWITCHES_ROWS NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1
|
||||
#endif
|
||||
|
||||
#if defined(PCBX3)
|
||||
#if defined(PCBX9LITE)
|
||||
#define BLUETOOTH_ROWS
|
||||
#elif defined(PCBTARANIS)
|
||||
#define BLUETOOTH_ROWS uint8_t(IS_BLUETOOTH_CHIP_PRESENT() ? 0 : HIDDEN_ROW), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_TELEMETRY ? -1 : HIDDEN_ROW), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : -1), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : -1), uint8_t(g_eeGeneral.bluetoothMode == BLUETOOTH_OFF ? HIDDEN_ROW : 0),
|
||||
|
@ -160,7 +160,7 @@ enum MenuRadioHardwareItems {
|
|||
#define BLUETOOTH_ROWS
|
||||
#endif
|
||||
|
||||
#if defined(PCBX3)
|
||||
#if defined(PCBX9LITE)
|
||||
#define SWITCH_TYPE_MAX(sw) (sw == MIXSRC_SD-MIXSRC_FIRST_SWITCH ? SWITCH_2POS : SWITCH_3POS)
|
||||
#elif defined(PCBXLITES)
|
||||
#define SWITCH_TYPE_MAX(sw) (sw >= MIXSRC_SE-MIXSRC_FIRST_SWITCH ? SWITCH_2POS : SWITCH_3POS)
|
||||
|
@ -259,7 +259,7 @@ void menuRadioHardware(event_t event)
|
|||
break;
|
||||
|
||||
case ITEM_RADIO_HARDWARE_POT1:
|
||||
#if !defined(PCBX3)
|
||||
#if !defined(PCBX9LITE)
|
||||
case ITEM_RADIO_HARDWARE_POT2:
|
||||
#endif
|
||||
{
|
||||
|
@ -414,7 +414,7 @@ void menuRadioHardware(event_t event)
|
|||
break;
|
||||
|
||||
case ITEM_RADIO_HARDWARE_RAS:
|
||||
#if defined(PCBX3)
|
||||
#if defined(PCBX9LITE)
|
||||
lcdDrawTextAlignedLeft(y, "Ext. RAS");
|
||||
lcdNextPos = HW_SETTINGS_COLUMN2;
|
||||
#else
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "opentx.h"
|
||||
|
||||
// TODO duplicated code
|
||||
#if defined(PCBX7) || defined(PCBX9E) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9E) || defined(PCBX9LITE)
|
||||
#define EVT_KEY_NEXT_LINE EVT_ROTARY_RIGHT
|
||||
#define EVT_KEY_PREVIOUS_LINE EVT_ROTARY_LEFT
|
||||
#else
|
||||
|
|
|
@ -227,7 +227,7 @@ void displayVoltageOrAlarm()
|
|||
#define displayVoltageOrAlarm() displayBattVoltage()
|
||||
#endif
|
||||
|
||||
#if defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBX9LITE)
|
||||
#define EVT_KEY_CONTEXT_MENU EVT_KEY_LONG(KEY_ENTER)
|
||||
#define EVT_KEY_NEXT_VIEW EVT_KEY_BREAK(KEY_PAGE)
|
||||
#define EVT_KEY_NEXT_PAGE EVT_ROTARY_RIGHT
|
||||
|
@ -482,7 +482,7 @@ void menuMainView(event_t event)
|
|||
doMainScreenGraphics();
|
||||
|
||||
// Switches
|
||||
#if defined(PCBX3)
|
||||
#if defined(PCBX9LITE)
|
||||
static const uint8_t x[NUM_SWITCHES] = {2*FW-2, 2*FW-2, 16*FW+1, 2*FW-2, 16*FW+1};
|
||||
static const uint8_t y[NUM_SWITCHES] = {4*FH+1, 5*FH+1, 5*FH+1, 6*FH+1, 6*FH+1};
|
||||
for (int i=0; i<NUM_SWITCHES; ++i) {
|
||||
|
|
|
@ -712,7 +712,7 @@ bool isTrainerModeAvailable(int mode)
|
|||
else
|
||||
return true;
|
||||
}
|
||||
#elif defined(PCBX7) || defined(PCBXLITES) || defined(PCBX3)
|
||||
#elif defined(PCBX7) || defined(PCBXLITES) || defined(PCBX9LITE)
|
||||
bool isTrainerModeAvailable(int mode)
|
||||
{
|
||||
if (IS_EXTERNAL_MODULE_ENABLED() && (mode == TRAINER_MODE_MASTER_SBUS_EXTERNAL_MODULE || mode == TRAINER_MODE_MASTER_CPPM_EXTERNAL_MODULE))
|
||||
|
|
|
@ -172,7 +172,7 @@ void writeHeader()
|
|||
#define STR_SWITCHES_LOG_HEADER "SA,SB,SC,SD"
|
||||
#elif defined(PCBXLITES)
|
||||
#define STR_SWITCHES_LOG_HEADER "SA,SB,SC,SD,SE,SF"
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define STR_SWITCHES_LOG_HEADER "SA,SB,SC,SE,SF"
|
||||
#else
|
||||
#define STR_SWITCHES_LOG_HEADER "SA,SB,SC,SD,SE,SF,SG,SH"
|
||||
|
@ -274,7 +274,7 @@ void logsWrite()
|
|||
}
|
||||
|
||||
// TODO: use hardware config to populate
|
||||
#if defined(PCBX3)
|
||||
#if defined(PCBX9LITE)
|
||||
f_printf(&g_oLogFile, "%d,%d,%d,%d,0x%08X%08X,",
|
||||
GET_3POS_STATE(SA),
|
||||
GET_3POS_STATE(SB),
|
||||
|
|
|
@ -34,7 +34,7 @@ set(LUA_INCLUDES_STM32F4
|
|||
)
|
||||
|
||||
if(PYTHONINTERP_FOUND)
|
||||
add_lua_export_target(x3 ${LUA_INCLUDES_STM32F2} -DPCBTARANIS -DPCBX3 -DPCBX9)
|
||||
add_lua_export_target(x9lite ${LUA_INCLUDES_STM32F2} -DPCBTARANIS -DPCBX9LITE -DPCBX9)
|
||||
add_lua_export_target(x7 ${LUA_INCLUDES_STM32F2} -DPCBTARANIS -DPCBX7)
|
||||
add_lua_export_target(xlite ${LUA_INCLUDES_STM32F2} -DPCBTARANIS -DPCBXLITE)
|
||||
add_lua_export_target(xlites ${LUA_INCLUDES_STM32F2} -DPCBTARANIS -DPCBXLITES -DPCBXLITE -DGYRO)
|
||||
|
|
|
@ -33,8 +33,8 @@
|
|||
#include "lua/lua_exports_x9e.inc"
|
||||
#elif defined(PCBX7)
|
||||
#include "lua/lua_exports_x7.inc"
|
||||
#elif defined(PCBX3)
|
||||
#include "lua/lua_exports_x3.inc"
|
||||
#elif defined(PCBX9LITE)
|
||||
#include "lua/lua_exports_x9lite.inc"
|
||||
#elif defined(PCBXLITES)
|
||||
#include "lua/lua_exports_xlites.inc"
|
||||
#elif defined(PCBXLITE)
|
||||
|
@ -1444,11 +1444,11 @@ const luaR_value_entry opentxConstants[] = {
|
|||
{ "MIXSRC_SB", MIXSRC_SB },
|
||||
{ "MIXSRC_SC", MIXSRC_SC },
|
||||
{ "MIXSRC_SD", MIXSRC_SD },
|
||||
#if !defined(PCBX7) && !defined(PCBXLITE) && !defined(PCBX3)
|
||||
#if !defined(PCBX7) && !defined(PCBXLITE) && !defined(PCBX9LITE)
|
||||
{ "MIXSRC_SE", MIXSRC_SE },
|
||||
{ "MIXSRC_SG", MIXSRC_SG },
|
||||
#endif
|
||||
#if !defined(PCBXLITE) && !defined(PCBX3)
|
||||
#if !defined(PCBXLITE) && !defined(PCBX9LITE)
|
||||
{ "MIXSRC_SF", MIXSRC_SF },
|
||||
{ "MIXSRC_SH", MIXSRC_SH },
|
||||
#endif
|
||||
|
|
|
@ -242,7 +242,7 @@ void generalDefault()
|
|||
g_eeGeneral.potsConfig = 0x0F; // S1 and S2 = pot without detent
|
||||
#elif defined(PCBX7)
|
||||
g_eeGeneral.potsConfig = (POT_WITHOUT_DETENT << 0) + (POT_WITH_DETENT << 2); // S1 = pot without detent, S2 = pot with detent
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
g_eeGeneral.potsConfig = (POT_WITH_DETENT << 0); // S1 = pot with detent
|
||||
#elif defined(PCBTARANIS)
|
||||
g_eeGeneral.potsConfig = 0x05; // S1 and S2 = pots with detent
|
||||
|
@ -255,7 +255,7 @@ void generalDefault()
|
|||
g_eeGeneral.switchConfig = (SWITCH_2POS << 6) + (SWITCH_2POS << 4) + (SWITCH_3POS << 2) + (SWITCH_3POS << 0);
|
||||
#elif defined(PCBX7)
|
||||
g_eeGeneral.switchConfig = 0x000006ff; // 4x3POS, 1x2POS, 1xTOGGLE
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
g_eeGeneral.switchConfig = (SWITCH_TOGGLE << 8) + (SWITCH_2POS << 6) + (SWITCH_3POS << 4) + (SWITCH_3POS << 2) + (SWITCH_3POS << 0);
|
||||
#elif defined(PCBTARANIS) || defined(PCBHORUS)
|
||||
g_eeGeneral.switchConfig = 0x00007bff; // 6x3POS, 1x2POS, 1xTOGGLE
|
||||
|
|
|
@ -140,9 +140,9 @@ const char * getBasename(const char * path);
|
|||
#elif defined(PCBX7)
|
||||
#define OTX_FOURCC 0x3678746F // otx for Taranis X7
|
||||
#define O9X_FOURCC 0x3378396F // o9x for Taranis X7
|
||||
#elif defined(PCBX3)
|
||||
#define OTX_FOURCC 0x3C78746F // otx for Taranis X3
|
||||
#define O9X_FOURCC 0x3C78396F // o9x for Taranis X3
|
||||
#elif defined(PCBX9LITE)
|
||||
#define OTX_FOURCC 0x3C78746F // otx for Taranis X9Lite
|
||||
#define O9X_FOURCC 0x3C78396F // o9x for Taranis X9Lite
|
||||
#elif defined(PCBX9D) || defined(PCBX9DP)
|
||||
#define OTX_FOURCC 0x3378746F // otx for Taranis X9D
|
||||
#define O9X_FOURCC 0x3378396F // o9x for Taranis X9D
|
||||
|
|
|
@ -132,12 +132,12 @@ void getSwitchesPosition(bool startup)
|
|||
CHECK_3POS(0, SW_SA);
|
||||
CHECK_3POS(1, SW_SB);
|
||||
CHECK_3POS(2, SW_SC);
|
||||
#if !defined(PCBX3)
|
||||
#if !defined(PCBX9LITE)
|
||||
CHECK_3POS(3, SW_SD);
|
||||
#endif
|
||||
#if defined(PCBXLITES) || defined(PCBX3)
|
||||
#if defined(PCBXLITES) || defined(PCBX9LITE)
|
||||
CHECK_2POS(SW_SE);
|
||||
#elif defined(PCBX7) || defined(PCBXLITE) || defined(PCBX3)
|
||||
#elif defined(PCBX7) || defined(PCBXLITE) || defined(PCBX9LITE)
|
||||
// No SE
|
||||
#else
|
||||
CHECK_3POS(4, SW_SE);
|
||||
|
@ -147,12 +147,12 @@ void getSwitchesPosition(bool startup)
|
|||
#else
|
||||
CHECK_2POS(SW_SF);
|
||||
#endif
|
||||
#if defined(PCBX7) || defined(PCBXLITE) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBXLITE) || defined(PCBX9LITE)
|
||||
// No SG
|
||||
#else
|
||||
CHECK_3POS(5, SW_SG);
|
||||
#endif
|
||||
#if defined(PCBXLITE) || defined(PCBX3)
|
||||
#if defined(PCBXLITE) || defined(PCBX9LITE)
|
||||
// No SH
|
||||
#else
|
||||
CHECK_2POS(SW_SH);
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
const int8_t ana_direction[NUM_ANALOGS] = {1,-1,1,-1, 1,1,-1, 1,1, 1};
|
||||
#elif defined(PCBX7)
|
||||
const int8_t ana_direction[NUM_ANALOGS] = {-1,1,-1,1, 1,1, 1};
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
const int8_t ana_direction[NUM_ANALOGS] = {-1,1,-1,1, 1,1};
|
||||
#elif defined(PCBXLITE)
|
||||
const int8_t ana_direction[NUM_ANALOGS] = {1,-1,-1,1, -1,1, 1};
|
||||
|
@ -119,7 +119,7 @@ void adcInit()
|
|||
// TODO why do we invert POT1 and POT2 here?
|
||||
ADC_MAIN->SQR2 = (ADC_CHANNEL_BATT<<0) + (ADC_CHANNEL_RTC<<5); // conversions 7 and more
|
||||
ADC_MAIN->SQR3 = (ADC_CHANNEL_STICK_LH<<0) + (ADC_CHANNEL_STICK_LV<<5) + (ADC_CHANNEL_STICK_RV<<10) + (ADC_CHANNEL_STICK_RH<<15) + (ADC_CHANNEL_POT1<<25) + (ADC_CHANNEL_POT2<<20); // conversions 1 to 6
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
ADC_MAIN->SQR2 = (ADC_CHANNEL_RTC<<0); // conversions 7 and more
|
||||
ADC_MAIN->SQR3 = (ADC_CHANNEL_STICK_LH<<0) + (ADC_CHANNEL_STICK_LV<<5) + (ADC_CHANNEL_STICK_RV<<10) + (ADC_CHANNEL_STICK_RH<<15) + (ADC_CHANNEL_POT1<<20) + (ADC_CHANNEL_BATT<<25); // conversions 1 to 6
|
||||
#else
|
||||
|
|
|
@ -85,7 +85,7 @@ set(BOOTLOADER_SRC
|
|||
bin_files.cpp
|
||||
)
|
||||
|
||||
if(PCB STREQUAL X12S OR PCB STREQUAL X10 OR PCB STREQUAL X9E OR PCB STREQUAL X7 OR PCB STREQUAL X3)
|
||||
if(PCB STREQUAL X12S OR PCB STREQUAL X10 OR PCB STREQUAL X9E OR PCB STREQUAL X7 OR PCB STREQUAL X9LITE)
|
||||
set(BOOTLOADER_SRC
|
||||
${BOOTLOADER_SRC}
|
||||
../../../../../targets/common/arm/stm32/rotary_encoder_driver.cpp
|
||||
|
|
|
@ -614,8 +614,8 @@ class OpenTxSimulatorFactory: public SimulatorFactory
|
|||
return Board::BOARD_X10;
|
||||
#elif defined(PCBX7)
|
||||
return Board::BOARD_TARANIS_X7;
|
||||
#elif defined(PCBX3)
|
||||
return Board::BOARD_TARANIS_X3;
|
||||
#elif defined(PCBX9LITE)
|
||||
return Board::BOARD_TARANIS_X9LITE;
|
||||
#elif defined(PCBTARANIS)
|
||||
return Board::BOARD_TARANIS_X9D;
|
||||
#else
|
||||
|
|
|
@ -277,7 +277,7 @@ void simuSetSwitch(uint8_t swtch, int8_t state)
|
|||
#elif defined(PCBXLITES)
|
||||
SWITCH_CASE (4, SWITCHES_GPIO_REG_E, SWITCHES_GPIO_PIN_E)
|
||||
SWITCH_CASE (5, SWITCHES_GPIO_REG_F, SWITCHES_GPIO_PIN_F)
|
||||
#elif !defined(PCBXLITE) && !defined(PCBX3)
|
||||
#elif !defined(PCBXLITE) && !defined(PCBX9LITE)
|
||||
SWITCH_3_CASE(4, SWITCHES_GPIO_REG_E_L, SWITCHES_GPIO_REG_E_H, SWITCHES_GPIO_PIN_E_L, SWITCHES_GPIO_PIN_E_H)
|
||||
SWITCH_CASE (5, SWITCHES_GPIO_REG_F, SWITCHES_GPIO_PIN_F)
|
||||
SWITCH_3_CASE(6, SWITCHES_GPIO_REG_G_L, SWITCHES_GPIO_REG_G_H, SWITCHES_GPIO_PIN_G_L, SWITCHES_GPIO_PIN_G_H)
|
||||
|
|
|
@ -85,17 +85,17 @@ elseif(PCB STREQUAL X7)
|
|||
set(LCD_DRIVER lcd_driver_spi.cpp)
|
||||
set(GVAR_SCREEN model_gvars.cpp)
|
||||
set(STATUS_LEDS YES)
|
||||
elseif(PCB STREQUAL X3)
|
||||
elseif(PCB STREQUAL X9LITE)
|
||||
set(PXX_FREQUENCY "HIGH")
|
||||
set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
|
||||
set(CPU_TYPE STM32F2)
|
||||
set(CPU_TYPE_FULL STM32F205xE) # for size report
|
||||
set(LINKER_SCRIPT targets/taranis/stm32f2_flash.ld)
|
||||
set(HAPTIC YES)
|
||||
set(LUA_EXPORT lua_export_x3)
|
||||
set(FLAVOUR x3)
|
||||
set(LUA_EXPORT lua_export_x9lite)
|
||||
set(FLAVOUR x9lite)
|
||||
add_definitions(-DBOARD_NAME="x9lite")
|
||||
add_definitions(-DPCBX3 -DPCBX9 -DSOFTWARE_VOLUME)
|
||||
add_definitions(-DPCBX9LITE -DPCBX9 -DSOFTWARE_VOLUME)
|
||||
add_definitions(-DEEPROM_VARIANT=0x0800)
|
||||
add_definitions(-DPWR_BUTTON_${PWR_BUTTON})
|
||||
set(GUI_DIR 128x64)
|
||||
|
@ -157,7 +157,7 @@ if(PCB STREQUAL XLITES)
|
|||
)
|
||||
endif()
|
||||
|
||||
if(PCB STREQUAL XLITE OR PCB STREQUAL XLITES OR PCB STREQUAL X3)
|
||||
if(PCB STREQUAL XLITE OR PCB STREQUAL XLITES OR PCB STREQUAL X9LITE)
|
||||
add_definitions(-DINTERNAL_MODULE_SERIAL)
|
||||
if(PXX_FREQUENCY STREQUAL HIGH)
|
||||
add_definitions(-DPXX_FREQUENCY_HIGH)
|
||||
|
@ -184,7 +184,7 @@ if(NOT PCB STREQUAL XLITE)
|
|||
)
|
||||
endif()
|
||||
|
||||
if(PCB STREQUAL X9E OR PCB STREQUAL X7 OR PCB STREQUAL X3)
|
||||
if(PCB STREQUAL X9E OR PCB STREQUAL X7 OR PCB STREQUAL X9LITE)
|
||||
set(TARGET_SRC
|
||||
${TARGET_SRC}
|
||||
../common/arm/stm32/rotary_encoder_driver.cpp
|
||||
|
|
|
@ -97,7 +97,7 @@ uint8_t isBacklightEnabled()
|
|||
{
|
||||
return (BACKLIGHT_TIMER->CCR4 != 0 || BACKLIGHT_TIMER->CCR2 != 0);
|
||||
}
|
||||
#elif defined(PCBX7) || defined(PCBXLITE) || defined(PCBX3)
|
||||
#elif defined(PCBX7) || defined(PCBXLITE) || defined(PCBX9LITE)
|
||||
void backlightInit()
|
||||
{
|
||||
GPIO_InitTypeDef GPIO_InitStructure;
|
||||
|
|
|
@ -218,7 +218,7 @@ void extmoduleSendNextFrame();
|
|||
#define SLAVE_MODE() (g_model.trainerData.mode == TRAINER_MODE_SLAVE)
|
||||
#if defined(PCBX9E)
|
||||
#define TRAINER_CONNECTED() (true)
|
||||
#elif defined(PCBX7) || defined(PCBX3)
|
||||
#elif defined(PCBX7) || defined(PCBX9LITE)
|
||||
#define TRAINER_CONNECTED() (GPIO_ReadInputDataBit(TRAINER_DETECT_GPIO, TRAINER_DETECT_GPIO_PIN) == Bit_SET)
|
||||
#elif defined(PCBXLITES)
|
||||
enum JackState
|
||||
|
@ -342,7 +342,7 @@ enum EnumSwitchesPositions
|
|||
SW_SC0,
|
||||
SW_SC1,
|
||||
SW_SC2,
|
||||
#if !defined(PCBX3)
|
||||
#if !defined(PCBX9LITE)
|
||||
SW_SD0,
|
||||
SW_SD1,
|
||||
SW_SD2,
|
||||
|
@ -407,7 +407,7 @@ enum EnumSwitchesPositions
|
|||
#define NUM_SWITCHES 4
|
||||
#elif defined(PCBX7)
|
||||
#define NUM_SWITCHES 6
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define NUM_SWITCHES 5
|
||||
#elif defined(PCBX9E)
|
||||
#define NUM_SWITCHES 18 // yes, it's a lot!
|
||||
|
@ -422,7 +422,7 @@ uint32_t readTrims(void);
|
|||
#define TRIMS_PRESSED() (readTrims())
|
||||
#define KEYS_PRESSED() (readKeys())
|
||||
|
||||
#if defined(PCBX9E) || defined(PCBX7) || defined(PCBX3)
|
||||
#if defined(PCBX9E) || defined(PCBX7) || defined(PCBX9LITE)
|
||||
// Rotary Encoder driver
|
||||
#define ROTARY_ENCODER_NAVIGATION
|
||||
void rotaryEncoderInit(void);
|
||||
|
@ -452,7 +452,7 @@ enum Analogs {
|
|||
STICK4,
|
||||
POT_FIRST,
|
||||
POT1 = POT_FIRST,
|
||||
#if defined(PCBX3)
|
||||
#if defined(PCBX9LITE)
|
||||
POT_LAST = POT1,
|
||||
#elif defined(PCBXLITE) || defined(PCBX7)
|
||||
POT2,
|
||||
|
@ -513,7 +513,7 @@ extern HardwareOptions hardwareOptions;
|
|||
#if !defined(PXX2)
|
||||
#define IS_PXX2_INTERNAL_ENABLED() (false)
|
||||
#define IS_PXX1_INTERNAL_ENABLED() (true)
|
||||
#elif !defined(PXX1) || defined(PCBXLITES) || defined(PCBX3)
|
||||
#elif !defined(PXX1) || defined(PCBXLITES) || defined(PCBX9LITE)
|
||||
#define IS_PXX2_INTERNAL_ENABLED() (true)
|
||||
#define IS_PXX1_INTERNAL_ENABLED() (false)
|
||||
#else
|
||||
|
@ -571,7 +571,7 @@ uint16_t getBatteryVoltage(); // returns current battery voltage in 10mV steps
|
|||
#define BATT_SCALE 131
|
||||
#elif defined(PCBX7)
|
||||
#define BATT_SCALE 123
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define BATT_SCALE 117
|
||||
#else
|
||||
#define BATT_SCALE 150
|
||||
|
@ -646,7 +646,7 @@ uint8_t telemetryGetByte(uint8_t * byte);
|
|||
extern uint32_t telemetryErrors;
|
||||
|
||||
// PCBREV driver
|
||||
#if defined(PCBXLITE) || defined(PCBX3)
|
||||
#if defined(PCBXLITE) || defined(PCBX9LITE)
|
||||
#define HAS_SPORT_UPDATE_CONNECTOR() true
|
||||
#elif defined(PCBX7)
|
||||
#define IS_PCBREV_40() (GPIO_ReadInputDataBit(PCBREV_GPIO, PCBREV_GPIO_PIN) == Bit_SET)
|
||||
|
@ -742,7 +742,7 @@ void bluetoothInit(uint32_t baudrate, bool enable);
|
|||
void bluetoothWriteWakeup(void);
|
||||
uint8_t bluetoothIsWriting(void);
|
||||
void bluetoothDisable(void);
|
||||
#if defined(PCBX3)
|
||||
#if defined(PCBX9LITE)
|
||||
#define IS_BLUETOOTH_CHIP_PRESENT() (false)
|
||||
#elif (defined(PCBX7) || defined(PCBXLITE)) && !defined(SIMU)
|
||||
extern volatile uint8_t btChipPresent;
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
#define KEYS_GPIO_PIN_EXIT GPIO_Pin_2 // PD.02
|
||||
#define KEYS_GPIO_REG_ENTER GPIOE->IDR
|
||||
#define KEYS_GPIO_PIN_ENTER GPIO_Pin_10 // PE.10
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define KEYS_GPIO_REG_PAGE GPIOE->IDR
|
||||
#define KEYS_GPIO_PIN_PAGE GPIO_Pin_8 // PE.08
|
||||
#define KEYS_GPIO_REG_MENU GPIOE->IDR
|
||||
|
@ -106,7 +106,7 @@
|
|||
#define ROTARY_ENCODER_EXTI_PortSource EXTI_PortSourceGPIOE
|
||||
#define ROTARY_ENCODER_EXTI_PinSource1 EXTI_PinSource9
|
||||
#define ROTARY_ENCODER_EXTI_PinSource2 EXTI_PinSource11
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define ROTARY_ENCODER_GPIO GPIOE
|
||||
#define ROTARY_ENCODER_GPIO_PIN_A GPIO_Pin_10 // PE.10
|
||||
#define ROTARY_ENCODER_GPIO_PIN_B GPIO_Pin_12 // PE.12
|
||||
|
@ -121,7 +121,7 @@
|
|||
#endif
|
||||
|
||||
// This is for SIMU: reuse rotary encoder pins to map UP and DOWN keyboard keys
|
||||
#if defined(SIMU) && (defined(PCBX9E) || defined(PCBX7) || defined(PCBX3))
|
||||
#if defined(SIMU) && (defined(PCBX9E) || defined(PCBX7) || defined(PCBX9LITE))
|
||||
#define KEYS_GPIO_REG_PLUS ROTARY_ENCODER_GPIO->IDR
|
||||
#define KEYS_GPIO_PIN_PLUS ROTARY_ENCODER_GPIO_PIN_A
|
||||
#define KEYS_GPIO_REG_MINUS ROTARY_ENCODER_GPIO->IDR
|
||||
|
@ -172,7 +172,7 @@
|
|||
#define TRIMS_GPIO_PIN_RVU GPIO_Pin_2 // PC.02
|
||||
#define TRIMS_GPIO_REG_RHR GPIOE->IDR
|
||||
#define TRIMS_GPIO_PIN_RHR GPIO_Pin_4 // PE.04
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define TRIMS_GPIO_REG_LHR GPIOC->IDR
|
||||
#define TRIMS_GPIO_PIN_LHR GPIO_Pin_4 // PC.04
|
||||
#define TRIMS_GPIO_REG_LHL GPIOC->IDR
|
||||
|
@ -214,7 +214,7 @@
|
|||
#define SWITCHES_GPIO_PIN_A_H GPIO_Pin_10 // PD.10
|
||||
#define SWITCHES_GPIO_REG_A_L GPIOD->IDR
|
||||
#define SWITCHES_GPIO_PIN_A_L GPIO_Pin_14 // PD.14
|
||||
#elif defined(PCBXLITE) || defined(PCBX3)
|
||||
#elif defined(PCBXLITE) || defined(PCBX9LITE)
|
||||
#define SWITCHES_GPIO_REG_A_H GPIOE->IDR
|
||||
#define SWITCHES_GPIO_PIN_A_H GPIO_Pin_1 // PE.01
|
||||
#define SWITCHES_GPIO_REG_A_L GPIOE->IDR
|
||||
|
@ -246,7 +246,7 @@
|
|||
#define SWITCHES_GPIO_PIN_B_L GPIO_Pin_15 // PE.15
|
||||
#define SWITCHES_GPIO_REG_B_H GPIOA->IDR
|
||||
#define SWITCHES_GPIO_PIN_B_H GPIO_Pin_5 // PA.05
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define SWITCHES_GPIO_REG_B_L GPIOB->IDR
|
||||
#define SWITCHES_GPIO_PIN_B_L GPIO_Pin_4 // PB.04
|
||||
#define SWITCHES_GPIO_REG_B_H GPIOB->IDR
|
||||
|
@ -263,7 +263,7 @@
|
|||
#define SWITCHES_GPIO_PIN_C_H GPIO_Pin_13 // PF.13
|
||||
#define SWITCHES_GPIO_REG_C_L GPIOF->IDR
|
||||
#define SWITCHES_GPIO_PIN_C_L GPIO_Pin_14 // PF.14
|
||||
#elif defined(PCBXLITE) || defined(PCBX3)
|
||||
#elif defined(PCBXLITE) || defined(PCBX9LITE)
|
||||
#define SWITCHES_GPIO_REG_C_L GPIOE->IDR
|
||||
#define SWITCHES_GPIO_PIN_C_L GPIO_Pin_2 // PE.02
|
||||
#define SWITCHES_GPIO_REG_C_H GPIOE->IDR
|
||||
|
@ -300,7 +300,7 @@
|
|||
#define SWITCHES_GPIO_PIN_D_L GPIO_Pin_1 // PE.01
|
||||
#define SWITCHES_GPIO_REG_D_H GPIOE->IDR
|
||||
#define SWITCHES_GPIO_PIN_D_H GPIO_Pin_2 // PE.02
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
// no SWD
|
||||
#else
|
||||
#define SWITCHES_GPIO_REG_D_H GPIOE->IDR
|
||||
|
@ -317,7 +317,7 @@
|
|||
#elif defined(PCBXLITES)
|
||||
#define SWITCHES_GPIO_REG_E GPIOE->IDR
|
||||
#define SWITCHES_GPIO_PIN_E GPIO_Pin_5 // PE.05
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define SWITCHES_GPIO_REG_E GPIOC->IDR
|
||||
#define SWITCHES_GPIO_PIN_E GPIO_Pin_13 // PC.13
|
||||
#elif defined(PCBX7) || defined(PCBXLITE)
|
||||
|
@ -340,7 +340,7 @@
|
|||
#elif defined(PCBX7)
|
||||
#define SWITCHES_GPIO_REG_F GPIOE->IDR
|
||||
#define SWITCHES_GPIO_PIN_F GPIO_Pin_14 // PE.14
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define SWITCHES_GPIO_REG_F GPIOA->IDR
|
||||
#define SWITCHES_GPIO_PIN_F GPIO_Pin_5 // PA.05
|
||||
#else
|
||||
|
@ -353,7 +353,7 @@
|
|||
#define SWITCHES_GPIO_PIN_G_H GPIO_Pin_3 // PF.03
|
||||
#define SWITCHES_GPIO_REG_G_L GPIOF->IDR
|
||||
#define SWITCHES_GPIO_PIN_G_L GPIO_Pin_4 // PF.04
|
||||
#elif defined(PCBX7) || defined(PCBXLITE) || defined(PCBX3)
|
||||
#elif defined(PCBX7) || defined(PCBXLITE) || defined(PCBX9LITE)
|
||||
// no SWG
|
||||
#else
|
||||
#define SWITCHES_GPIO_REG_G_H GPIOE->IDR
|
||||
|
@ -368,7 +368,7 @@
|
|||
#elif defined(PCBX9DP)
|
||||
#define SWITCHES_GPIO_REG_H GPIOD->IDR
|
||||
#define SWITCHES_GPIO_PIN_H GPIO_Pin_14 // PD.14
|
||||
#elif defined(PCBXLITE) || defined(PCBX3)
|
||||
#elif defined(PCBXLITE) || defined(PCBX9LITE)
|
||||
// no SWH
|
||||
#elif defined(PCBX7)
|
||||
#define SWITCHES_GPIO_REG_H GPIOD->IDR
|
||||
|
@ -455,7 +455,7 @@
|
|||
#define KEYS_GPIOC_PINS (TRIMS_GPIO_PIN_LHR | TRIMS_GPIO_PIN_RVD | TRIMS_GPIO_PIN_RVU)
|
||||
#define KEYS_GPIOD_PINS (TRIMS_GPIO_PIN_LHL | KEYS_GPIO_PIN_MENU | KEYS_GPIO_PIN_EXIT | KEYS_GPIO_PIN_PAGE | SWITCHES_GPIO_PIN_C_L | SWITCHES_GPIO_PIN_H)
|
||||
#define KEYS_GPIOE_PINS (ROTARY_ENCODER_GPIO_PIN_A | ROTARY_ENCODER_GPIO_PIN_B | KEYS_GPIO_PIN_ENTER | TRIMS_GPIO_PIN_RHR | TRIMS_GPIO_PIN_RHL | TRIMS_GPIO_PIN_LVD | TRIMS_GPIO_PIN_LVU | SWITCHES_GPIO_PIN_C_H | SWITCHES_GPIO_PIN_D_L | SWITCHES_GPIO_PIN_D_H | SWITCHES_GPIO_PIN_B_L | SWITCHES_GPIO_PIN_A_L | SWITCHES_GPIO_PIN_A_H | SWITCHES_GPIO_PIN_F)
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define KEYS_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOD | RCC_AHB1Periph_GPIOE)
|
||||
#define KEYS_GPIOA_PINS (GPIO_Pin_5)
|
||||
#define KEYS_GPIOB_PINS (GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_4 | GPIO_Pin_5)
|
||||
|
@ -594,7 +594,7 @@
|
|||
#define ADC_CHANNEL_POT1 ADC_Channel_6
|
||||
#define ADC_CHANNEL_POT2 ADC_Channel_8
|
||||
#define ADC_CHANNEL_BATT ADC_Channel_10
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define ADC_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_DMA2)
|
||||
#define ADC_RCC_APB1Periph 0
|
||||
#define ADC_RCC_APB2Periph RCC_APB2Periph_ADC1
|
||||
|
@ -643,7 +643,7 @@
|
|||
// PWR and LED driver
|
||||
#define PWR_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOD | RCC_AHB1Periph_GPIOE)
|
||||
|
||||
#if defined(PCBX3)
|
||||
#if defined(PCBX9LITE)
|
||||
#define PWR_SWITCH_GPIO GPIOA
|
||||
#define PWR_SWITCH_GPIO_PIN GPIO_Pin_7 // PA.07
|
||||
#define PWR_ON_GPIO GPIOA
|
||||
|
@ -680,7 +680,7 @@
|
|||
#define LED_RED_GPIO_PIN GPIO_Pin_5 // PC.05
|
||||
#define LED_BLUE_GPIO GPIOB
|
||||
#define LED_BLUE_GPIO_PIN GPIO_Pin_1 // PB.01
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define STATUS_LEDS
|
||||
#define GPIO_LED_GPIO_ON GPIO_SetBits
|
||||
#define GPIO_LED_GPIO_OFF GPIO_ResetBits
|
||||
|
@ -694,13 +694,13 @@
|
|||
|
||||
// Internal Module
|
||||
#define HARDWARE_INTERNAL_MODULE
|
||||
#if defined(PCBXLITES) || defined(PCBX3)
|
||||
#if defined(PCBXLITES) || defined(PCBX9LITE)
|
||||
#define INTMODULE_NO_PXX1
|
||||
#endif
|
||||
#if defined(PCBXLITE) || defined(PCBX3)
|
||||
#if defined(PCBXLITE) || defined(PCBX9LITE)
|
||||
#define INTMODULE_RCC_APB1Periph RCC_APB1Periph_TIM3
|
||||
#define INTMODULE_RCC_APB2Periph RCC_APB2Periph_USART1
|
||||
#if defined(PCBXLITES) || defined(PCBX3)
|
||||
#if defined(PCBXLITES) || defined(PCBX9LITE)
|
||||
#define INTMODULE_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_DMA2)
|
||||
#define INTMODULE_PWR_GPIO GPIOA
|
||||
#define INTMODULE_PWR_GPIO_PIN GPIO_Pin_15 // PA.15
|
||||
|
@ -776,9 +776,9 @@
|
|||
// External Module
|
||||
#define EXTMODULE_PULSES
|
||||
|
||||
#if defined(PCBXLITE) || defined(PCBX3)
|
||||
#if defined(PCBXLITE) || defined(PCBX9LITE)
|
||||
#define EXTMODULE_RCC_APB2Periph (RCC_APB2Periph_TIM8 | RCC_APB2Periph_USART6)
|
||||
#if defined(PCBX3)
|
||||
#if defined(PCBX9LITE)
|
||||
#define EXTMODULE_RCC_AHB1Periph (RCC_AHB1Periph_GPIOA | RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_DMA2)
|
||||
#define EXTMODULE_PWR_GPIO GPIOA
|
||||
#define EXTMODULE_PWR_GPIO_PIN GPIO_Pin_8 // PA.08
|
||||
|
@ -842,7 +842,7 @@
|
|||
#endif
|
||||
|
||||
// Trainer Port
|
||||
#if defined(PCBXLITES) || defined(PCBX3)
|
||||
#if defined(PCBXLITES) || defined(PCBX9LITE)
|
||||
// on these 2 radios the trainer port already uses DMA1_Stream6, we won't use the DMA
|
||||
#define TRAINER_RCC_AHB1Periph RCC_AHB1Periph_GPIOD
|
||||
#define TRAINER_RCC_APB1Periph RCC_APB1Periph_TIM4
|
||||
|
@ -851,7 +851,7 @@
|
|||
#define TRAINER_IN_GPIO_PinSource GPIO_PinSource13
|
||||
#define TRAINER_OUT_GPIO_PIN GPIO_Pin_12 // PD.12
|
||||
#define TRAINER_OUT_GPIO_PinSource GPIO_PinSource12
|
||||
#if defined(PCBX3)
|
||||
#if defined(PCBX9LITE)
|
||||
#define TRAINER_DETECT_GPIO GPIOD
|
||||
#define TRAINER_DETECT_GPIO_PIN GPIO_Pin_11 // PD.11
|
||||
#endif
|
||||
|
@ -913,7 +913,7 @@
|
|||
#endif
|
||||
|
||||
// Serial Port
|
||||
#if defined(PCBX7) || defined(PCBXLITE) || defined(PCBX3)
|
||||
#if defined(PCBX7) || defined(PCBXLITE) || defined(PCBX9LITE)
|
||||
#define SERIAL_RCC_AHB1Periph 0
|
||||
#define SERIAL_RCC_APB1Periph 0
|
||||
#else
|
||||
|
@ -938,7 +938,7 @@
|
|||
#define TELEMETRY_RCC_APB1Periph RCC_APB1Periph_USART2
|
||||
#define TELEMETRY_DIR_GPIO GPIOD
|
||||
#define TELEMETRY_DIR_GPIO_PIN GPIO_Pin_4 // PD.04
|
||||
#if defined(PCBXLITE) || defined(PCBX3)
|
||||
#if defined(PCBXLITE) || defined(PCBX9LITE)
|
||||
#define TELEMETRY_DIR_OUTPUT() TELEMETRY_DIR_GPIO->BSRRH = TELEMETRY_DIR_GPIO_PIN
|
||||
#define TELEMETRY_DIR_INPUT() TELEMETRY_DIR_GPIO->BSRRL = TELEMETRY_DIR_GPIO_PIN
|
||||
#else
|
||||
|
@ -984,7 +984,7 @@
|
|||
#define SPORT_UPDATE_PWR_GPIO_PIN GPIO_Pin_2 // PB.02
|
||||
#define GPIO_SPORT_UPDATE_PWR_GPIO_ON GPIO_SetBits
|
||||
#define GPIO_SPORT_UPDATE_PWR_GPIO_OFF GPIO_ResetBits
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define SPORT_MAX_BAUDRATE 250000 // not tested
|
||||
#define SPORT_UPDATE_RCC_AHB1Periph RCC_AHB1Periph_GPIOE
|
||||
#define SPORT_UPDATE_PWR_GPIO GPIOE
|
||||
|
@ -997,7 +997,7 @@
|
|||
#endif
|
||||
|
||||
// Heartbeat
|
||||
#if defined(PCBXLITE) || defined(PCBX3)
|
||||
#if defined(PCBXLITE) || defined(PCBX9LITE)
|
||||
#define HEARTBEAT_RCC_AHB1Periph RCC_AHB1Periph_GPIOD
|
||||
#define HEARTBEAT_RCC_APB2Periph 0
|
||||
#define HEARTBEAT_GPIO GPIOD
|
||||
|
@ -1055,7 +1055,7 @@
|
|||
#define BACKLIGHT_GPIO_PinSource_2 GPIO_PinSource13
|
||||
#define BACKLIGHT_GPIO_AF_1 GPIO_AF_TIM4
|
||||
#define BACKLIGHT_GPIO_AF_2 GPIO_AF_TIM4
|
||||
#elif defined(PCBXLITES) || defined(PCBX3)
|
||||
#elif defined(PCBXLITES) || defined(PCBX9LITE)
|
||||
#define BACKLIGHT_RCC_AHB1Periph RCC_AHB1Periph_GPIOA
|
||||
#define BACKLIGHT_RCC_APB1Periph 0
|
||||
#define BACKLIGHT_RCC_APB2Periph RCC_APB2Periph_TIM1
|
||||
|
@ -1128,7 +1128,7 @@
|
|||
#define LCD_DMA_FLAG_INT DMA_HIFCR_CTCIF7
|
||||
#define LCD_SPI SPI3
|
||||
#define LCD_GPIO_AF GPIO_AF_SPI3
|
||||
#elif defined(PCBXLITE) || defined(PCBX3)
|
||||
#elif defined(PCBXLITE) || defined(PCBX9LITE)
|
||||
#define LCD_RCC_AHB1Periph (RCC_AHB1Periph_GPIOC | RCC_AHB1Periph_GPIOD | RCC_AHB1Periph_DMA1)
|
||||
#define LCD_RCC_APB1Periph RCC_APB1Periph_SPI3
|
||||
#define LCD_SPI_GPIO GPIOC
|
||||
|
@ -1188,7 +1188,7 @@
|
|||
#define I2C_RCC_APB1Periph RCC_APB1Periph_I2C1
|
||||
#define I2C I2C1
|
||||
#define I2C_GPIO_AF GPIO_AF_I2C1
|
||||
#if defined(PCBXLITE) || defined(PCBX3)
|
||||
#if defined(PCBXLITE) || defined(PCBX9LITE)
|
||||
#define I2C_RCC_AHB1Periph (RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOD)
|
||||
#define I2C_SPI_GPIO GPIOB
|
||||
#define I2C_SDA_GPIO_PIN GPIO_Pin_9 // PB.09
|
||||
|
@ -1238,7 +1238,7 @@
|
|||
#define SD_RCC_AHB1Periph (RCC_AHB1Periph_GPIOD | RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_DMA1)
|
||||
#define SD_RCC_APB1Periph RCC_APB1Periph_SPI2
|
||||
#define SD_GPIO_PRESENT_GPIO GPIOD
|
||||
#if defined(PCBXLITE) || defined(PCBX3)
|
||||
#if defined(PCBXLITE) || defined(PCBX9LITE)
|
||||
#define SD_GPIO_PRESENT_GPIO_PIN GPIO_Pin_10 // PD.10
|
||||
#else
|
||||
#define SD_GPIO_PRESENT_GPIO_PIN GPIO_Pin_9 // PD.09
|
||||
|
@ -1290,7 +1290,7 @@
|
|||
#endif
|
||||
|
||||
// Haptic
|
||||
#if defined(PCBXLITE) || defined(PCBX3)
|
||||
#if defined(PCBXLITE) || defined(PCBX9LITE)
|
||||
#define HAPTIC_PWM
|
||||
#define HAPTIC_RCC_AHB1Periph RCC_AHB1Periph_GPIOB
|
||||
#define HAPTIC_RCC_APB1Periph RCC_APB1Periph_TIM2
|
||||
|
|
|
@ -182,15 +182,15 @@ uint32_t switchState(uint8_t index)
|
|||
ADD_3POS_CASE(A, 0);
|
||||
ADD_3POS_CASE(B, 1);
|
||||
ADD_3POS_CASE(C, 2);
|
||||
#if !defined(PCBX3)
|
||||
#if !defined(PCBX9LITE)
|
||||
ADD_3POS_CASE(D, 3);
|
||||
#endif
|
||||
#if defined(PCBXLITES) || defined(PCBX3)
|
||||
#if defined(PCBXLITES) || defined(PCBX9LITE)
|
||||
ADD_2POS_CASE(E);
|
||||
ADD_2POS_CASE(F);
|
||||
// no SWG and SWH on XLITES and X3
|
||||
#elif defined(PCBXLITE) || defined(PCBX3)
|
||||
// no SWE, SWF, SWG and SWH on X3 and XLITE
|
||||
// no SWG and SWH on XLITES and X9
|
||||
#elif defined(PCBXLITE) || defined(PCBX9LITE)
|
||||
// no SWE, SWF, SWG and SWH on X9LITE and XLITE
|
||||
#elif defined(PCBX7)
|
||||
ADD_2POS_CASE(F);
|
||||
ADD_2POS_CASE(H);
|
||||
|
|
|
@ -308,7 +308,7 @@ int sbusGetByte(uint8_t * byte)
|
|||
case TRAINER_MODE_MASTER_SBUS_EXTERNAL_MODULE:
|
||||
return heartbeatFifo.pop(*byte);
|
||||
#endif
|
||||
#if !defined(PCBX7) && !defined(PCBX9E) && !defined(PCBX3) && !defined(PCBXLITE)
|
||||
#if !defined(PCBX7) && !defined(PCBX9E) && !defined(PCBX9LITE) && !defined(PCBXLITE)
|
||||
case TRAINER_MODE_MASTER_BATTERY_COMPARTMENT:
|
||||
return serial2RxFifo.pop(*byte);
|
||||
#endif
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
#define LEN_JACKMODES "\007"
|
||||
#define TR_JACKMODES "Zeptat\0""Audio\0 ""Trenér"
|
||||
|
||||
#if defined(PCBXLITES) || defined(PCBX3)
|
||||
#if defined(PCBXLITES) || defined(PCBX9LITE)
|
||||
#define LEN_MODULE_PROTOCOLS "\014"
|
||||
#define TR_MODULE_PROTOCOLS "Vyp\0 ""PPM\0 ""XJT\0 ""ISRM\0 ""DSM2\0 ""CRSF\0 ""MULT\0 ""R9M\0 ""R9M ACCESS\0 ""R9MLite\0 ""R9ML ACCESS\0""R9M Lite PRO""SBUS\0"
|
||||
#else
|
||||
|
@ -415,7 +415,7 @@
|
|||
#elif defined(PCBX7)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0""\310S2\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SF\0""\312SH\0"
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SE\0"
|
||||
#elif defined(PCBTARANIS)
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
#define LEN_JACKMODES "\007"
|
||||
#define TR_JACKMODES "Popup\0 ""Audio\0 ""Trainer"
|
||||
|
||||
#if defined(PCBXLITES) || defined(PCBX3)
|
||||
#if defined(PCBXLITES) || defined(PCBX9LITE)
|
||||
#define LEN_MODULE_PROTOCOLS "\014"
|
||||
#define TR_MODULE_PROTOCOLS "OFF\0 ""PPM\0 ""XJT\0 ""ISRM\0 ""DSM2\0 ""CRSF\0 ""MULT\0 ""R9M\0 ""R9M ACCESS\0 ""R9MLite\0 ""R9ML ACCESS\0""R9M Lite PRO""SBUS\0"
|
||||
#else
|
||||
|
@ -429,7 +429,7 @@
|
|||
#elif defined(PCBX7)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0""\310S2\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SF\0""\312SH\0"
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SE\0"
|
||||
#elif defined(PCBTARANIS)
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
#define LEN_JACKMODES "\007"
|
||||
#define TR_JACKMODES "Ask\0 ""Audio\0 ""Trainer"
|
||||
|
||||
#if defined(PCBXLITES) || defined(PCBX3)
|
||||
#if defined(PCBXLITES) || defined(PCBX9LITE)
|
||||
#define LEN_MODULE_PROTOCOLS "\014"
|
||||
#define TR_MODULE_PROTOCOLS "OFF\0 ""PPM\0 ""XJT\0 ""ISRM\0 ""DSM2\0 ""CRSF\0 ""MULT\0 ""R9M\0 ""R9M ACCESS\0 ""R9MLite\0 ""R9ML ACCESS\0""R9M Lite PRO""SBUS\0"
|
||||
#else
|
||||
|
@ -418,7 +418,7 @@
|
|||
#elif defined(PCBX7)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0""\310S2\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SF\0""\312SH\0"
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SE\0"
|
||||
#elif defined(PCBTARANIS)
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
#define LEN_JACKMODES "\007"
|
||||
#define TR_JACKMODES "Ask\0 ""Audio\0 ""Trainer"
|
||||
|
||||
#if defined(PCBXLITES) || defined(PCBX3)
|
||||
#if defined(PCBXLITES) || defined(PCBX9LITE)
|
||||
#define LEN_MODULE_PROTOCOLS "\014"
|
||||
#define TR_MODULE_PROTOCOLS "OFF\0 ""PPM\0 ""XJT\0 ""ISRM\0 ""DSM2\0 ""CRSF\0 ""MULT\0 ""R9M\0 ""R9M ACCESS\0 ""R9MLite\0 ""R9ML ACCESS\0""R9M Lite PRO""SBUS\0"
|
||||
#else
|
||||
|
@ -418,7 +418,7 @@
|
|||
#elif defined(PCBX7)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0""\310S2\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SF\0""\312SH\0"
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SE\0"
|
||||
#elif defined(PCBTARANIS)
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
#define LEN_JACKMODES "\007"
|
||||
#define TR_JACKMODES "Ask\0 ""Audio\0 ""Trainer"
|
||||
|
||||
#if defined(PCBXLITES) || defined(PCBX3)
|
||||
#if defined(PCBXLITES) || defined(PCBX9LITE)
|
||||
#define LEN_MODULE_PROTOCOLS "\014"
|
||||
#define TR_MODULE_PROTOCOLS "OFF\0 ""PPM\0 ""XJT\0 ""ISRM\0 ""DSM2\0 ""CRSF\0 ""MULT\0 ""R9M\0 ""R9M ACCESS\0 ""R9MLite\0 ""R9ML ACCESS\0""R9M Lite PRO""SBUS\0"
|
||||
#else
|
||||
|
@ -418,7 +418,7 @@
|
|||
#elif defined(PCBX7)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0""\310S2\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SF\0""\312SH\0"
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SE\0"
|
||||
#elif defined(PCBTARANIS)
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
#define LEN_JACKMODES "\007"
|
||||
#define TR_JACKMODES "Demander""Audio\0 ""Ecolage"
|
||||
|
||||
#if defined(PCBXLITES) || defined(PCBX3)
|
||||
#if defined(PCBXLITES) || defined(PCBX9LITE)
|
||||
#define LEN_MODULE_PROTOCOLS "\014"
|
||||
#define TR_MODULE_PROTOCOLS "OFF\0 ""PPM\0 ""XJT\0 ""ISRM\0 ""DSM2\0 ""CRSF\0 ""MULT\0 ""R9M\0 ""R9M ACCESS\0 ""R9MLite\0 ""R9ML ACCESS\0""R9M Lite PRO""SBUS\0"
|
||||
#else
|
||||
|
@ -431,7 +431,7 @@
|
|||
#elif defined(PCBX7)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0""\310S2\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SF\0""\312SH\0"
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SE\0"
|
||||
#elif defined(PCBTARANIS)
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
#define LEN_JACKMODES "\007"
|
||||
#define TR_JACKMODES "Ask\0 ""Audio\0 ""Trainer"
|
||||
|
||||
#if defined(PCBXLITES) || defined(PCBX3)
|
||||
#if defined(PCBXLITES) || defined(PCBX9LITE)
|
||||
#define LEN_MODULE_PROTOCOLS "\014"
|
||||
#define TR_MODULE_PROTOCOLS "OFF\0 ""PPM\0 ""XJT\0 ""ISRM\0 ""DSM2\0 ""CRSF\0 ""MULT\0 ""R9M\0 ""R9M ACCESS\0 ""R9MLite\0 ""R9ML ACCESS\0""R9M Lite PRO""SBUS\0"
|
||||
#else
|
||||
|
@ -420,7 +420,7 @@
|
|||
#elif defined(PCBX7)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0""\310S2\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SF\0""\312SH\0"
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SE\0"
|
||||
#elif defined(PCBTARANIS)
|
||||
|
|
|
@ -106,7 +106,7 @@
|
|||
#define LEN_JACKMODES "\007"
|
||||
#define TR_JACKMODES "Popup\0 ""Audio\0 ""Trainer"
|
||||
|
||||
#if defined(PCBXLITES) || defined(PCBX3)
|
||||
#if defined(PCBXLITES) || defined(PCBX9LITE)
|
||||
#define LEN_MODULE_PROTOCOLS "\014"
|
||||
#define TR_MODULE_PROTOCOLS "OFF\0 ""PPM\0 ""XJT\0 ""ISRM\0 ""DSM2\0 ""CRSF\0 ""MULT\0 ""R9M\0 ""R9M ACCESS\0 ""R9MLite\0 ""R9ML ACCESS\0""R9M Lite PRO""SBUS\0"
|
||||
#else
|
||||
|
@ -413,7 +413,7 @@
|
|||
#elif defined(PCBX7)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0""\310S2\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SF\0""\312SH\0"
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SE\0"
|
||||
#elif defined(PCBTARANIS)
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
#define LEN_JACKMODES "\007"
|
||||
#define TR_JACKMODES "Ask\0 ""Audio\0 ""Trainer"
|
||||
|
||||
#if defined(PCBXLITES) || defined(PCBX3)
|
||||
#if defined(PCBXLITES) || defined(PCBX9LITE)
|
||||
#define LEN_MODULE_PROTOCOLS "\014"
|
||||
#define TR_MODULE_PROTOCOLS "OFF\0 ""PPM\0 ""XJT\0 ""ISRM\0 ""DSM2\0 ""CRSF\0 ""MULT\0 ""R9M\0 ""R9M ACCESS\0 ""R9MLite\0 ""R9ML ACCESS\0""R9M Lite PRO""SBUS\0"
|
||||
#else
|
||||
|
@ -421,7 +421,7 @@
|
|||
#elif defined(PCBX7)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0""\310S2\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SF\0""\312SH\0"
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SE\0"
|
||||
#elif defined(PCBTARANIS)
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
#define LEN_JACKMODES "\007"
|
||||
#define TR_JACKMODES "Popup\0 ""Audio\0 ""Trainer"
|
||||
|
||||
#if defined(PCBXLITES) || defined(PCBX3)
|
||||
#if defined(PCBXLITES) || defined(PCBX9LITE)
|
||||
#define LEN_MODULE_PROTOCOLS "\014"
|
||||
#define TR_MODULE_PROTOCOLS "OFF\0 ""PPM\0 ""XJT\0 ""ISRM\0 ""DSM2\0 ""CRSF\0 ""MULT\0 ""R9M\0 ""R9M ACCESS\0 ""R9MLite\0 ""R9ML ACCESS\0""R9M Lite PRO""SBUS\0"
|
||||
#else
|
||||
|
@ -417,7 +417,7 @@
|
|||
#elif defined(PCBX7)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0""\310S2\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SF\0""\312SH\0"
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SE\0"
|
||||
#elif defined(PCBTARANIS)
|
||||
|
|
|
@ -104,7 +104,7 @@
|
|||
#define LEN_JACKMODES "\007"
|
||||
#define TR_JACKMODES "Ask\0 ""Audio\0 ""Trainer"
|
||||
|
||||
#if defined(PCBXLITES) || defined(PCBX3)
|
||||
#if defined(PCBXLITES) || defined(PCBX9LITE)
|
||||
#define LEN_MODULE_PROTOCOLS "\014"
|
||||
#define TR_MODULE_PROTOCOLS "OFF\0 ""PPM\0 ""XJT\0 ""ISRM\0 ""DSM2\0 ""CRSF\0 ""MULT\0 ""R9M\0 ""R9M ACCESS\0 ""R9MLite\0 ""R9ML ACCESS\0""R9M Lite PRO""SBUS\0"
|
||||
#else
|
||||
|
@ -427,7 +427,7 @@
|
|||
#elif defined(PCBX7)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0""\310S2\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SF\0""\312SH\0"
|
||||
#elif defined(PCBX3)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SE\0"
|
||||
#elif defined(PCBTARANIS)
|
||||
|
|
|
@ -87,10 +87,10 @@ if [[ " 9XRPRO ARM9X ALL " =~ " ${FLAVOR} " ]] ; then
|
|||
make -j${CORES} gtests ; ./gtests ${TEST_OPTIONS}
|
||||
fi
|
||||
|
||||
if [[ " X3 ALL " =~ " ${FLAVOR} " ]] ; then
|
||||
# OpenTX on X3
|
||||
if [[ " X9LITE ALL " =~ " ${FLAVOR} " ]] ; then
|
||||
# OpenTX on X9LITE
|
||||
rm -rf *
|
||||
cmake ${COMMON_OPTIONS} -DPCB=X3 -DHELI=YES -DGVARS=YES ${SRCDIR}
|
||||
cmake ${COMMON_OPTIONS} -DPCB=X9LITE -DHELI=YES -DGVARS=YES ${SRCDIR}
|
||||
make -j${CORES} ${FIRMARE_TARGET}
|
||||
make -j${CORES} libsimulator
|
||||
make -j${CORES} gtests ; ./gtests ${TEST_OPTIONS}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue