Merge with latest 2.4
This commit is contained in:
@@ -69,6 +69,7 @@ if (PCB STREQUAL X10)
|
||||
set(BLUETOOTH ON)
|
||||
add_definitions(-DHARDWARE_POWER_MANAGEMENT_UNIT)
|
||||
add_definitions(-DRADIO_X10E)
|
||||
add_definitions(-DMANUFACTURER_FRSKY)
|
||||
elseif (PCBREV STREQUAL T16)
|
||||
set(FLAVOUR t16)
|
||||
set(LUA_EXPORT lua_export_t16)
|
||||
@@ -76,6 +77,7 @@ if (PCB STREQUAL X10)
|
||||
add_definitions(-DRADIO_FAMILY_T16)
|
||||
option(INTERNAL_MODULE_MULTI "Support for MULTI internal module" OFF)
|
||||
option(BLUETOOTH "Support for bluetooth module" OFF)
|
||||
add_definitions(-DMANUFACTURER_JUMPER)
|
||||
elseif (PCBREV STREQUAL TX16S)
|
||||
set(FLAVOUR tx16s)
|
||||
set(LUA_EXPORT lua_export_t16)
|
||||
@@ -89,6 +91,7 @@ if (PCB STREQUAL X10)
|
||||
set(DEFAULT_THEME "DARKBLUE")
|
||||
set(SBUS_TRAINER ON)
|
||||
set(AUX_SERIAL ON)
|
||||
add_definitions(-DMANUFACTURER_RADIOMASTER)
|
||||
if (NOT BLUETOOTH AND NOT INTERNAL_GPS)
|
||||
set(AUX2_SERIAL ON)
|
||||
endif()
|
||||
@@ -100,11 +103,13 @@ if (PCB STREQUAL X10)
|
||||
add_definitions(-DRADIO_FAMILY_T16)
|
||||
option(INTERNAL_MODULE_MULTI "Support for MULTI internal module" ON)
|
||||
option(BLUETOOTH "Support for bluetooth module" OFF)
|
||||
add_definitions(-DMANUFACTURER_JUMPER)
|
||||
else()
|
||||
set(FLAVOUR x10)
|
||||
option(INTERNAL_MODULE_PXX1 "Support for PXX1 internal module" ON)
|
||||
option(INTERNAL_MODULE_PXX2 "Support for PXX2 internal module" OFF)
|
||||
set(BLUETOOTH ON)
|
||||
add_definitions(-DMANUFACTURER_FRSKY)
|
||||
endif()
|
||||
elseif (PCB STREQUAL X12S)
|
||||
option(INTERNAL_MODULE_PXX1 "Support for PXX1 internal module" ON)
|
||||
@@ -134,6 +139,7 @@ elseif (PCB STREQUAL X12S)
|
||||
set(FONTS_TARGET x12s_fonts)
|
||||
set(LCD_DRIVER lcd_driver.cpp)
|
||||
set(LUA_EXPORT lua_export_x12s)
|
||||
add_definitions(-DMANUFACTURER_FRSKY)
|
||||
endif()
|
||||
|
||||
add_definitions(-DPCBREV=${PCBREV})
|
||||
|
||||
@@ -637,7 +637,11 @@ void sportUpdatePowerInit();
|
||||
#endif
|
||||
|
||||
// Aux serial port driver
|
||||
#define DEBUG_BAUDRATE 115200
|
||||
#if defined(RADIO_TX16S)
|
||||
#define DEBUG_BAUDRATE 400000
|
||||
#else
|
||||
#define DEBUG_BAUDRATE 115200
|
||||
#endif
|
||||
#if defined(AUX_SERIAL_GPIO)
|
||||
extern uint8_t auxSerialMode;
|
||||
void auxSerialInit(unsigned int mode, unsigned int protocol);
|
||||
@@ -711,6 +715,7 @@ void bluetoothDisable();
|
||||
extern DMAFifo<512> telemetryFifo;
|
||||
typedef DMAFifo<32> AuxSerialRxFifo;
|
||||
extern AuxSerialRxFifo auxSerialRxFifo;
|
||||
extern AuxSerialRxFifo aux2SerialRxFifo;
|
||||
extern volatile uint32_t externalModulePort;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -160,9 +160,16 @@ extern "C" void TRAINER_TIMER_IRQHandler()
|
||||
int sbusGetByte(uint8_t * byte)
|
||||
{
|
||||
switch (currentTrainerMode) {
|
||||
#if defined(AUX_SERIAL)
|
||||
#if defined(AUX_SERIAL) || defined(AUX2_SERIAL)
|
||||
case TRAINER_MODE_MASTER_BATTERY_COMPARTMENT:
|
||||
return trainerSbusFifo.pop(*byte);
|
||||
#if defined(AUX_SERIAL)
|
||||
if (auxSerialMode == UART_MODE_SBUS_TRAINER)
|
||||
return auxSerialRxFifo.pop(*byte);
|
||||
#endif
|
||||
#if defined(AUX2_SERIAL)
|
||||
if (aux2SerialMode == UART_MODE_SBUS_TRAINER)
|
||||
return aux2SerialRxFifo.pop(*byte);
|
||||
#endif
|
||||
#endif
|
||||
default:
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user