Fix DMA SBUS trainer on colorlcd

This commit is contained in:
3djc
2020-12-20 13:54:12 +01:00
parent a95df47384
commit bab16c912b
3 changed files with 11 additions and 12 deletions
+9 -2
View File
@@ -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;