Merge with latest 2.3
This commit is contained in:
@@ -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