mirror of
https://github.com/opentx/opentx.git
synced 2025-07-13 11:29:51 +03:00
X9LiteS (#6820)
This commit is contained in:
parent
a8a32792cc
commit
4a618f1317
25 changed files with 191 additions and 19 deletions
|
@ -24,6 +24,7 @@ env:
|
|||
# - FLAVOR=SKY9X
|
||||
# - FLAVOR=9XRPRO
|
||||
- FLAVOR=X9LITE
|
||||
- FLAVOR=X9LITES
|
||||
- FLAVOR=X7
|
||||
- FLAVOR=T12
|
||||
- FLAVOR=XLITE
|
||||
|
|
|
@ -75,6 +75,8 @@ uint32_t Boards::getFourCC(Type board)
|
|||
return 0x3378746F;
|
||||
case BOARD_TARANIS_X9LITE:
|
||||
return 0x3C78746F;
|
||||
case BOARD_TARANIS_X9LITES:
|
||||
return 0x3E78746F;
|
||||
case BOARD_SKY9X:
|
||||
case BOARD_AR9X:
|
||||
case BOARD_9XRPRO:
|
||||
|
@ -113,6 +115,7 @@ int Boards::getEEpromSize(Board::Type board)
|
|||
case BOARD_TARANIS_XLITE:
|
||||
case BOARD_TARANIS_X7:
|
||||
case BOARD_TARANIS_X9LITE:
|
||||
case BOARD_TARANIS_X9LITES:
|
||||
case BOARD_TARANIS_X9D:
|
||||
case BOARD_TARANIS_X9DP:
|
||||
case BOARD_TARANIS_X9DP_2019:
|
||||
|
@ -149,6 +152,7 @@ int Boards::getFlashSize(Type board)
|
|||
case BOARD_TARANIS_XLITE:
|
||||
case BOARD_TARANIS_X7:
|
||||
case BOARD_TARANIS_X9LITE:
|
||||
case BOARD_TARANIS_X9LITES:
|
||||
case BOARD_TARANIS_X9D:
|
||||
case BOARD_TARANIS_X9DP:
|
||||
case BOARD_TARANIS_X9DP_2019:
|
||||
|
@ -505,6 +509,8 @@ QString Boards::getBoardName(Board::Type board)
|
|||
return "Taranis X9E";
|
||||
case BOARD_TARANIS_X9LITE:
|
||||
return "Taranis X9-Lite";
|
||||
case BOARD_TARANIS_X9LITES:
|
||||
return "Taranis X9-Lite S";
|
||||
case BOARD_SKY9X:
|
||||
return "Sky9x";
|
||||
case BOARD_9XRPRO:
|
||||
|
|
|
@ -50,6 +50,7 @@ namespace Board {
|
|||
BOARD_TARANIS_XLITE,
|
||||
BOARD_TARANIS_XLITES,
|
||||
BOARD_TARANIS_X9LITE,
|
||||
BOARD_TARANIS_X9LITES,
|
||||
BOARD_JUMPER_T12,
|
||||
};
|
||||
|
||||
|
@ -239,7 +240,7 @@ inline bool IS_TARANIS_X7(Board::Type board)
|
|||
|
||||
inline bool IS_TARANIS_X9LITE(Board::Type board)
|
||||
{
|
||||
return board == Board::BOARD_TARANIS_X9LITE;
|
||||
return board == Board::BOARD_TARANIS_X9LITE || board == Board::BOARD_TARANIS_X9LITES;
|
||||
}
|
||||
|
||||
inline bool IS_TARANIS_X9(Board::Type board)
|
||||
|
|
|
@ -78,6 +78,8 @@ const char * OpenTxEepromInterface::getName()
|
|||
return "OpenTX for FrSky Taranis X9E";
|
||||
case BOARD_TARANIS_X7:
|
||||
return "OpenTX for FrSky Taranis X7";
|
||||
case BOARD_TARANIS_X9LITES:
|
||||
return "OpenTX for FrSky Taranis X9-Lite S";
|
||||
case BOARD_TARANIS_X9LITE:
|
||||
return "OpenTX for FrSky Taranis X9-Lite";
|
||||
case BOARD_TARANIS_XLITE:
|
||||
|
@ -1238,6 +1240,12 @@ void registerOpenTxFirmwares()
|
|||
firmware->addOption("autoupdate", Firmware::tr("Support for auto update on boot"));
|
||||
registerOpenTxFirmware(firmware);
|
||||
|
||||
/* FrSky X9-LiteS board */
|
||||
firmware = new OpenTxFirmware("opentx-x9lites", Firmware::tr("FrSky Taranis X9-Lite S"), BOARD_TARANIS_X9LITES);
|
||||
addOpenTxTaranisOptions(firmware);
|
||||
firmware->addOption("autoupdate", Firmware::tr("Support for auto update on boot"));
|
||||
registerOpenTxFirmware(firmware);
|
||||
|
||||
/* FrSky X7 board */
|
||||
firmware = new OpenTxFirmware("opentx-x7", Firmware::tr("FrSky Taranis X7 / X7S"), BOARD_TARANIS_X7);
|
||||
addOpenTxTaranisOptions(firmware);
|
||||
|
|
|
@ -60,6 +60,7 @@ SimulatorWidget::SimulatorWidget(QWidget * parent, SimulatorInterface * simulato
|
|||
|
||||
switch(m_board) {
|
||||
case Board::BOARD_TARANIS_X9LITE:
|
||||
case Board::BOARD_TARANIS_X9LITES:
|
||||
radioUiWidget = new SimulatedUIWidgetX9LITE(simulator, this);
|
||||
break;
|
||||
case Board::BOARD_TARANIS_X7:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
include(CMakeForceCompiler)
|
||||
include(Bitmaps)
|
||||
|
||||
set(PCB_TYPES X9LITE X7 XLITE XLITES X9D X9D+ X9E X10 X12S SKY9X 9XRPRO AR9X)
|
||||
set(PCB_TYPES X9LITE X9LITES 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)
|
||||
|
||||
|
@ -86,7 +86,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 X9LITE 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 X9LITES 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)
|
||||
|
@ -469,7 +469,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 X9LITE 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 X9LITES 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)
|
||||
|
|
|
@ -297,6 +297,36 @@ void onMainViewMenu(const char *result)
|
|||
}
|
||||
}
|
||||
|
||||
void drawSmallSwitch(coord_t x, coord_t y, int width, unsigned int index)
|
||||
{
|
||||
if (SWITCH_EXISTS(index)) {
|
||||
int val = getValue(MIXSRC_FIRST_SWITCH+index);
|
||||
|
||||
if (val >= 0) {
|
||||
lcdDrawSolidHorizontalLine(x, y, width);
|
||||
lcdDrawSolidHorizontalLine(x, y+2, width);
|
||||
y += 4;
|
||||
if (val > 0) {
|
||||
lcdDrawSolidHorizontalLine(x, y, width);
|
||||
lcdDrawSolidHorizontalLine(x, y+2, width);
|
||||
y += 4;
|
||||
}
|
||||
}
|
||||
|
||||
lcdDrawChar(width==5 ? x+1 : x, y, 'A'+index, SMLSIZE);
|
||||
y += 7;
|
||||
|
||||
if (val <= 0) {
|
||||
lcdDrawSolidHorizontalLine(x, y, width);
|
||||
lcdDrawSolidHorizontalLine(x, y+2, width);
|
||||
if (val < 0) {
|
||||
lcdDrawSolidHorizontalLine(x, y+4, width);
|
||||
lcdDrawSolidHorizontalLine(x, y+6, width);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void menuMainView(event_t event)
|
||||
{
|
||||
uint8_t view = g_eeGeneral.view;
|
||||
|
@ -472,7 +502,19 @@ void menuMainView(event_t event)
|
|||
doMainScreenGraphics();
|
||||
|
||||
// Switches
|
||||
#if defined(PCBX9LITE)
|
||||
#if defined(PCBX9LITES)
|
||||
static const uint8_t x[NUM_SWITCHES-2] = {2*FW-2, 2*FW-2, 17*FW+1, 2*FW-2, 17*FW+1};
|
||||
static const uint8_t y[NUM_SWITCHES-2] = {4*FH+1, 5*FH+1, 5*FH+1, 6*FH+1, 6*FH+1};
|
||||
for (int i=0; i<NUM_SWITCHES - 2; ++i) {
|
||||
if (SWITCH_EXISTS(i)) {
|
||||
getvalue_t val = getValue(MIXSRC_FIRST_SWITCH + i);
|
||||
getvalue_t sw = ((val < 0) ? 3 * i + 1 : ((val == 0) ? 3 * i + 2 : 3 * i + 3));
|
||||
drawSwitch(x[i], y[i], sw, 0);
|
||||
}
|
||||
}
|
||||
drawSmallSwitch(29, 5*FH+1, 4, SW_SF);
|
||||
drawSmallSwitch(16*FW+1, 5*FH+1, 4, SW_SG);
|
||||
#elif 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) {
|
||||
|
|
|
@ -209,6 +209,8 @@ enum {
|
|||
#define SWITCHES_ROWS NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1
|
||||
#elif NUM_SWITCHES == 8
|
||||
#define SWITCHES_ROWS NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1
|
||||
#elif NUM_SWITCHES == 7
|
||||
#define SWITCHES_ROWS NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1
|
||||
#elif NUM_SWITCHES == 6
|
||||
#define SWITCHES_ROWS NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1, NAVIGATION_LINE_BY_LINE|1
|
||||
#elif NUM_SWITCHES == 5
|
||||
|
@ -602,7 +604,7 @@ void menuRadioHardware(event_t event)
|
|||
break;
|
||||
|
||||
case ITEM_RADIO_HARDWARE_RAS:
|
||||
#if defined(PCBX9LITE)
|
||||
#if defined(PCBX9LITE) && !defined(PCBX9LITES)
|
||||
lcdDrawTextAlignedLeft(y, "Ext. RAS");
|
||||
lcdNextPos = HW_SETTINGS_COLUMN2;
|
||||
#else
|
||||
|
|
|
@ -17,6 +17,7 @@ set(LUA_INCLUDES
|
|||
|
||||
if(PYTHONINTERP_FOUND)
|
||||
add_lua_export_target(x9lite ${LUA_INCLUDES} -DPCBTARANIS -DPCBX9LITE -DPCBX9)
|
||||
add_lua_export_target(x9lites ${LUA_INCLUDES} -DPCBTARANIS -DPCBX9LITES -DPCBX9LITE -DPCBX9)
|
||||
add_lua_export_target(x7 ${LUA_INCLUDES} -DPCBTARANIS -DPCBX7 -DRADIO_X7)
|
||||
add_lua_export_target(xlite ${LUA_INCLUDES} -DPCBTARANIS -DPCBXLITE)
|
||||
add_lua_export_target(xlites ${LUA_INCLUDES} -DPCBTARANIS -DPCBXLITES -DPCBXLITE -DGYRO)
|
||||
|
|
|
@ -35,6 +35,8 @@
|
|||
#include "lua/lua_exports_x7.inc"
|
||||
#elif defined(RADIO_T12)
|
||||
#include "lua/lua_exports_t12.inc"
|
||||
#elif defined(PCBX9LITES)
|
||||
#include "lua/lua_exports_x9lites.inc"
|
||||
#elif defined(PCBX9LITE)
|
||||
#include "lua/lua_exports_x9lite.inc"
|
||||
#elif defined(PCBXLITES)
|
||||
|
|
|
@ -135,6 +135,8 @@ const char * getBasename(const char * path);
|
|||
#define OTX_FOURCC 0x3978746F // otx for Taranis X-Lite
|
||||
#elif defined(RADIO_X7)
|
||||
#define OTX_FOURCC 0x3678746F // otx for Taranis X7
|
||||
#elif defined(PCBX9LITES)
|
||||
#define OTX_FOURCC 0x3E78746F // otx for Taranis X9-Lite
|
||||
#elif defined(PCBX9LITE)
|
||||
#define OTX_FOURCC 0x3C78746F // otx for Taranis X9-Lite
|
||||
#elif defined(PCBX9D) || defined(PCBX9DP)
|
||||
|
|
|
@ -331,7 +331,7 @@ void OpenTxSim::updateKeysAndSwitches(bool start)
|
|||
SWITCH_KEY(C, 2, 3);
|
||||
SWITCH_KEY(D, 3, 3);
|
||||
|
||||
#if defined(HARDWARE_SWITCH_G)
|
||||
#if defined(HARDWARE_SWITCH_G) && defined(HARDWARE_SWITCH_H)
|
||||
SWITCH_KEY(E, 4, 3);
|
||||
SWITCH_KEY(F, 5, 2);
|
||||
SWITCH_KEY(G, 6, 3);
|
||||
|
|
|
@ -131,7 +131,12 @@ void getSwitchesPosition(bool startup)
|
|||
CHECK_3POS(1, SW_SB);
|
||||
CHECK_3POS(2, SW_SC);
|
||||
|
||||
#if defined(PCBX9LITE)
|
||||
#if defined(PCBX9LITES)
|
||||
CHECK_2POS(SW_SD);
|
||||
CHECK_2POS(SW_SE);
|
||||
CHECK_2POS(SW_SF);
|
||||
CHECK_2POS(SW_SG);
|
||||
#elif defined(PCBX9LITE)
|
||||
CHECK_2POS(SW_SD);
|
||||
CHECK_2POS(SW_SE);
|
||||
#elif defined(PCBXLITES)
|
||||
|
|
|
@ -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 X9D+ AND PCBREV STREQUAL 2019) OR (PCB STREQUAL X7 AND NOT (PCBREV STREQUAL T12)) OR PCB STREQUAL X9LITE)
|
||||
if(PCB STREQUAL X12S OR PCB STREQUAL X10 OR PCB STREQUAL X9E OR (PCB STREQUAL X9D+ AND PCBREV STREQUAL 2019) OR (PCB STREQUAL X7 AND NOT (PCBREV STREQUAL T12)) OR PCB STREQUAL X9LITE OR PCB STREQUAL X9LITES)
|
||||
set(BOOTLOADER_SRC
|
||||
${BOOTLOADER_SRC}
|
||||
../../../../../targets/common/arm/stm32/rotary_encoder_driver.cpp
|
||||
|
|
|
@ -607,6 +607,8 @@ class OpenTxSimulatorFactory: public SimulatorFactory
|
|||
return Board::BOARD_X10;
|
||||
#elif defined(PCBX7)
|
||||
return Board::BOARD_TARANIS_X7;
|
||||
#elif defined(PCBX9LITES)
|
||||
return Board::BOARD_TARANIS_X9LITES;
|
||||
#elif defined(PCBX9LITE)
|
||||
return Board::BOARD_TARANIS_X9LITE;
|
||||
#elif defined(PCBTARANIS)
|
||||
|
|
|
@ -136,6 +136,27 @@ elseif(PCB STREQUAL X9LITE)
|
|||
set(LCD_DRIVER lcd_driver_spi.cpp)
|
||||
set(GVAR_SCREEN model_gvars.cpp)
|
||||
set(STATUS_LEDS YES)
|
||||
elseif(PCB STREQUAL X9LITES)
|
||||
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_x9lites)
|
||||
set(FLAVOUR x9lites)
|
||||
add_definitions(-DBOARD_NAME="x9lites")
|
||||
add_definitions(-DPCBX9LITES -DPCBX9LITE -DPCBX9 -DSOFTWARE_VOLUME -DHARDWARE_POWER_MANAGEMENT_UNIT)
|
||||
add_definitions(-DEEPROM_VARIANT=0x0800)
|
||||
add_definitions(-DPWR_BUTTON_${PWR_BUTTON})
|
||||
set(PXX2 ON)
|
||||
set(GUI_DIR 128x64)
|
||||
set(NAVIGATION_TYPE x7)
|
||||
set(BITMAPS_TARGET 9x_bitmaps)
|
||||
set(FONTS_TARGET 9x_fonts_1bit)
|
||||
set(LCD_DRIVER lcd_driver_spi.cpp)
|
||||
set(GVAR_SCREEN model_gvars.cpp)
|
||||
set(STATUS_LEDS YES)
|
||||
elseif(PCB STREQUAL XLITE)
|
||||
set(PXX_FREQUENCY "HIGH" CACHE STRING "PXX frequency (LOW / HIGH)") # always use HIGH except on some prototype boards
|
||||
set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
|
||||
|
@ -190,7 +211,7 @@ if(PCB STREQUAL XLITES)
|
|||
)
|
||||
endif()
|
||||
|
||||
if(PCB STREQUAL XLITE OR PCB STREQUAL XLITES OR PCB STREQUAL X9LITE OR (PCB STREQUAL X9D+ AND PCBREV STREQUAL 2019))
|
||||
if(PCB STREQUAL XLITE OR PCB STREQUAL XLITES OR PCB STREQUAL X9LITE OR PCB STREQUAL X9LITES OR (PCB STREQUAL X9D+ AND PCBREV STREQUAL 2019))
|
||||
add_definitions(-DINTERNAL_MODULE_SERIAL)
|
||||
if(PXX_FREQUENCY STREQUAL HIGH)
|
||||
add_definitions(-DPXX_FREQUENCY_HIGH)
|
||||
|
@ -206,14 +227,14 @@ elseif(NOT (PCB STREQUAL X7 AND PCBREV STREQUAL T12))
|
|||
)
|
||||
endif()
|
||||
|
||||
if(PCB STREQUAL X9E OR (PCB STREQUAL X9D+ AND PCBREV STREQUAL 2019) OR (PCB STREQUAL X7 AND NOT (PCBREV STREQUAL T12)) OR PCB STREQUAL X9LITE)
|
||||
if(PCB STREQUAL X9E OR (PCB STREQUAL X9D+ AND PCBREV STREQUAL 2019) OR (PCB STREQUAL X7 AND NOT (PCBREV STREQUAL T12)) OR PCB STREQUAL X9LITE OR PCB STREQUAL X9LITES)
|
||||
set(TARGET_SRC
|
||||
${TARGET_SRC}
|
||||
../common/arm/stm32/rotary_encoder_driver.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
if(PCB STREQUAL X9E OR PCB STREQUAL X7 OR PCB STREQUAL XLITE OR PCB STREQUAL XLITES OR (PCB STREQUAL X9D+ AND PCBREV STREQUAL 2019))
|
||||
if(PCB STREQUAL X9E OR PCB STREQUAL X7 OR PCB STREQUAL XLITE OR PCB STREQUAL XLITES OR (PCB STREQUAL X9D+ AND PCBREV STREQUAL 2019) OR PCB STREQUAL X9LITES)
|
||||
add_definitions(-DBLUETOOTH)
|
||||
set(TARGET_SRC
|
||||
${TARGET_SRC}
|
||||
|
|
|
@ -307,17 +307,17 @@ enum EnumSwitchesPositions
|
|||
SW_SD0,
|
||||
SW_SD1,
|
||||
SW_SD2,
|
||||
#if defined(PCBX9) || defined(PCBXLITES)
|
||||
#if defined(PCBX9) || defined(PCBXLITES) || defined(PCBX9LITES)
|
||||
SW_SE0,
|
||||
SW_SE1,
|
||||
SW_SE2,
|
||||
#endif
|
||||
#if defined(PCBX9D) || defined(PCBX9DP) || defined(PCBX9E) || defined(PCBX7) || defined(PCBXLITES)
|
||||
#if defined(PCBX9D) || defined(PCBX9DP) || defined(PCBX9E) || defined(PCBX7) || defined(PCBXLITES) || defined(PCBX9LITES)
|
||||
SW_SF0,
|
||||
SW_SF1,
|
||||
SW_SF2,
|
||||
#endif
|
||||
#if defined(PCBX9D) || defined(PCBX9DP) || defined(PCBX9E)
|
||||
#if defined(PCBX9D) || defined(PCBX9DP) || defined(PCBX9E) || defined(PCBX9LITES)
|
||||
SW_SG0,
|
||||
SW_SG1,
|
||||
SW_SG2,
|
||||
|
@ -395,6 +395,11 @@ enum EnumSwitchesPositions
|
|||
#define STORAGE_NUM_SWITCHES NUM_SWITCHES
|
||||
#define DEFAULT_SWITCH_CONFIG (SWITCH_TOGGLE << 10) + (SWITCH_2POS << 8) + (SWITCH_3POS << 6) + (SWITCH_3POS << 4) + (SWITCH_3POS << 2) + (SWITCH_3POS << 0)
|
||||
#define DEFAULT_POTS_CONFIG (POT_WITHOUT_DETENT << 0) + (POT_WITH_DETENT << 2); // S1 = pot without detent, S2 = pot with detent
|
||||
#elif defined(PCBX9LITES)
|
||||
#define NUM_SWITCHES 7
|
||||
#define STORAGE_NUM_SWITCHES NUM_SWITCHES
|
||||
#define DEFAULT_SWITCH_CONFIG (SWITCH_TOGGLE << 12) + (SWITCH_TOGGLE << 10) + (SWITCH_TOGGLE << 8) + (SWITCH_2POS << 6) + (SWITCH_3POS << 4) + (SWITCH_3POS << 2) + (SWITCH_3POS << 0);
|
||||
#define DEFAULT_POTS_CONFIG (POT_WITH_DETENT << 0); // S1 = pot with detent
|
||||
#elif defined(PCBX9LITE)
|
||||
#define NUM_SWITCHES 5
|
||||
#define STORAGE_NUM_SWITCHES NUM_SWITCHES
|
||||
|
@ -766,7 +771,9 @@ void bluetoothInit(uint32_t baudrate, bool enable);
|
|||
void bluetoothWriteWakeup();
|
||||
uint8_t bluetoothIsWriting();
|
||||
void bluetoothDisable();
|
||||
#if defined(PCBX9LITE)
|
||||
#if defined(PCBX9LITES)
|
||||
#define IS_BLUETOOTH_CHIP_PRESENT() (true)
|
||||
#elif defined(PCBX9LITE)
|
||||
#define IS_BLUETOOTH_CHIP_PRESENT() (false)
|
||||
#elif (defined(PCBX7) || defined(PCBXLITE)) && !defined(SIMU)
|
||||
extern volatile uint8_t btChipPresent;
|
||||
|
|
|
@ -448,6 +448,11 @@
|
|||
#elif defined(PCBXLITE)
|
||||
// no SWF but we want to remain compatible with XLiteS
|
||||
#define STORAGE_SWITCH_F
|
||||
#elif defined(PCBX9LITES)
|
||||
#define STORAGE_SWITCH_F
|
||||
#define HARDWARE_SWITCH_F
|
||||
#define SWITCHES_GPIO_REG_F GPIOC->IDR
|
||||
#define SWITCHES_GPIO_PIN_F GPIO_Pin_3 // PC.03
|
||||
#elif defined(PCBX9LITE)
|
||||
// no SWF
|
||||
#elif defined(PCBX7)
|
||||
|
@ -469,6 +474,11 @@
|
|||
#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(PCBX9LITES)
|
||||
#define STORAGE_SWITCH_G
|
||||
#define HARDWARE_SWITCH_G
|
||||
#define SWITCHES_GPIO_REG_G GPIOC->IDR
|
||||
#define SWITCHES_GPIO_PIN_G GPIO_Pin_2 // PC.02
|
||||
#elif defined(PCBX7) || defined(PCBXLITE) || defined(PCBX9LITE)
|
||||
// no SWG
|
||||
#else
|
||||
|
@ -635,6 +645,13 @@
|
|||
#define KEYS_GPIOC_PINS (GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_10 | GPIO_Pin_13)
|
||||
#define KEYS_GPIOD_PINS (GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_7 | GPIO_Pin_11 | GPIO_Pin_14 | GPIO_Pin_15)
|
||||
#define KEYS_GPIOE_PINS (GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_5 | GPIO_Pin_6 | GPIO_Pin_7 | GPIO_Pin_9 | GPIO_Pin_10 | GPIO_Pin_11 | GPIO_Pin_13 | GPIO_Pin_14 | GPIO_Pin_15)
|
||||
#elif defined(PCBX9LITES)
|
||||
#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)
|
||||
#define KEYS_GPIOC_PINS (GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_4 | GPIO_Pin_5 | GPIO_Pin_13)
|
||||
#define KEYS_GPIOD_PINS (GPIO_Pin_8 | GPIO_Pin_9)
|
||||
#define KEYS_GPIOE_PINS (GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_7 | GPIO_Pin_8 | GPIO_Pin_9 | GPIO_Pin_10 | GPIO_Pin_11 | GPIO_Pin_12 | GPIO_Pin_13 | GPIO_Pin_14)
|
||||
#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)
|
||||
|
@ -891,6 +908,14 @@
|
|||
#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(PCBX9LITES)
|
||||
#define STATUS_LEDS
|
||||
#define GPIO_LED_GPIO_ON GPIO_SetBits
|
||||
#define GPIO_LED_GPIO_OFF GPIO_ResetBits
|
||||
#define LED_RED_GPIO GPIOE
|
||||
#define LED_RED_GPIO_PIN GPIO_Pin_5 // PE.05
|
||||
#define LED_BLUE_GPIO GPIOE
|
||||
#define LED_BLUE_GPIO_PIN GPIO_Pin_6 // PE.06
|
||||
#elif defined(PCBX9LITE)
|
||||
#define STATUS_LEDS
|
||||
#define GPIO_LED_GPIO_ON GPIO_SetBits
|
||||
|
@ -1788,7 +1813,7 @@
|
|||
#define BT_TX_GPIO_PinSource GPIO_PinSource14
|
||||
#define BT_RX_GPIO_PinSource GPIO_PinSource9
|
||||
#define BT_USART_IRQHandler USART6_IRQHandler
|
||||
#elif defined(PCBX7) || defined(PCBXLITE) || (defined(PCBX9DP) && PCBREV >= 2019)
|
||||
#elif defined(PCBX7) || defined(PCBXLITE) || defined(PCBX9LITES) || (defined(PCBX9DP) && PCBREV >= 2019)
|
||||
#define STORAGE_BLUETOOTH
|
||||
#define BT_RCC_APB1Periph RCC_APB1Periph_USART3
|
||||
#define BT_RCC_APB2Periph 0
|
||||
|
@ -1800,6 +1825,10 @@
|
|||
#define BT_RCC_AHB1Periph (RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOE) // RCC_AHB1Periph_DMA1
|
||||
#define BT_EN_GPIO GPIOE
|
||||
#define BT_EN_GPIO_PIN GPIO_Pin_15 // PE.15
|
||||
#elif defined(PCBX9LITES)
|
||||
#define BT_RCC_AHB1Periph (RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOD) // RCC_AHB1Periph_DMA1
|
||||
#define BT_EN_GPIO GPIOD
|
||||
#define BT_EN_GPIO_PIN GPIO_Pin_14 // PD.14
|
||||
#else
|
||||
#define BT_RCC_AHB1Periph (RCC_AHB1Periph_GPIOB | RCC_AHB1Periph_GPIOE) // RCC_AHB1Periph_DMA1
|
||||
#define BT_EN_GPIO GPIOE
|
||||
|
|
|
@ -179,7 +179,12 @@ uint32_t switchState(uint8_t index)
|
|||
ADD_3POS_CASE(B, 1);
|
||||
ADD_3POS_CASE(C, 2);
|
||||
|
||||
#if defined(PCBX9LITE)
|
||||
#if defined(PCBX9LITES)
|
||||
ADD_2POS_CASE(D);
|
||||
ADD_2POS_CASE(E);
|
||||
ADD_2POS_CASE(F);
|
||||
ADD_2POS_CASE(G);
|
||||
#elif defined(PCBX9LITE)
|
||||
ADD_2POS_CASE(D);
|
||||
ADD_2POS_CASE(E);
|
||||
#elif defined(PCBXLITES)
|
||||
|
|
|
@ -50,6 +50,9 @@
|
|||
#elif defined(RADIO_T12)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0""\310S2\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SG\0""\312SH\0""\312SI\0""\312SJ\0"
|
||||
#elif defined(PCBX9LITES)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SE\0""\312SF\0""\312SG\0"
|
||||
#elif defined(PCBX9LITE)
|
||||
#define TR_POTS_VSRCRAW "\310S1\0"
|
||||
#define TR_SW_VSRCRAW "\312SA\0""\312SB\0""\312SC\0""\312SD\0""\312SE\0"
|
||||
|
|
|
@ -88,7 +88,11 @@ def main():
|
|||
cmake_options["PCB"] = "X9LITE"
|
||||
firmware_options = options_taranis_x9lite
|
||||
maxsize = 65536 * 8
|
||||
elif board_name == "x7":
|
||||
elif board_name == "x9lites":
|
||||
cmake_options["PCB"] = "X9LITES"
|
||||
firmware_options = options_taranis_x9lite
|
||||
maxsize = 65536 * 8
|
||||
elif options[optcount] == "x7":
|
||||
cmake_options["PCB"] = "X7"
|
||||
firmware_options = options_taranis_x9dp
|
||||
maxsize = 65536 * 8
|
||||
|
|
|
@ -50,6 +50,9 @@ make -j${JOBS} libsimulator
|
|||
cmake ${COMMON_OPTIONS} -DPCB=X9LITE ${SRCDIR}
|
||||
make -j${JOBS} libsimulator
|
||||
|
||||
cmake ${COMMON_OPTIONS} -DPCB=X9LITES ${SRCDIR}
|
||||
make -j${JOBS} libsimulator
|
||||
|
||||
cmake ${COMMON_OPTIONS} -DPCB=X7 ${SRCDIR}
|
||||
make -j${JOBS} libsimulator
|
||||
|
||||
|
|
|
@ -50,6 +50,9 @@ make -j${JOBS} libsimulator
|
|||
cmake ${COMMON_OPTIONS} -DPCB=X9LITE ${SRCDIR}
|
||||
make -j${JOBS} libsimulator
|
||||
|
||||
cmake ${COMMON_OPTIONS} -DPCB=X9LITES ${SRCDIR}
|
||||
make -j${JOBS} libsimulator
|
||||
|
||||
cmake ${COMMON_OPTIONS} -DPCB=X7 ${SRCDIR}
|
||||
make -j${JOBS} libsimulator
|
||||
|
||||
|
|
|
@ -61,6 +61,21 @@ boards = {
|
|||
"SBUS": "NO",
|
||||
"DEFAULT_MODE": "2",
|
||||
},
|
||||
"X9LITES": {
|
||||
"PCB": "X9LITES",
|
||||
"LUA": "NO_MODEL_SCRIPTS",
|
||||
"GVARS": "YES",
|
||||
"AUTOUPDATE": "YES",
|
||||
"PXX1": "YES",
|
||||
"XJT": "NO",
|
||||
"MODULE_SIZE_STD": "NO",
|
||||
"PPM": "NO",
|
||||
"DSM2": "NO",
|
||||
"MULTIMODULE": "NO",
|
||||
"CROSSFIRE": "NO",
|
||||
"SBUS": "NO",
|
||||
"DEFAULT_MODE": "2",
|
||||
},
|
||||
"X9D+": {
|
||||
"PCB": "X9D+",
|
||||
"PCBREV": "2019",
|
||||
|
|
|
@ -94,6 +94,15 @@ if [[ " X9LITE ALL " =~ " ${FLAVOR} " ]] ; then
|
|||
make -j${CORES} tests
|
||||
fi
|
||||
|
||||
if [[ " X9LITES ALL " =~ " ${FLAVOR} " ]] ; then
|
||||
# OpenTX on X9LITES
|
||||
rm -rf *
|
||||
cmake ${COMMON_OPTIONS} -DPCB=X9LITES -DHELI=YES -DGVARS=YES ${SRCDIR}
|
||||
make -j${CORES} ${FIRMARE_TARGET}
|
||||
make -j${CORES} libsimulator
|
||||
make -j${CORES} tests
|
||||
fi
|
||||
|
||||
if [[ " X7 ALL " =~ " ${FLAVOR} " ]] ; then
|
||||
# OpenTX on X7
|
||||
rm -rf *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue