1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 17:25:13 +03:00

Tx16s sbus in (#7787)

Enable SBUS trainer input
This commit is contained in:
3djc 2020-07-07 15:56:18 +02:00 committed by GitHub
parent 94ba22a74d
commit 0eb203e827
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 96 additions and 19 deletions

View file

@ -385,6 +385,24 @@ bool isSwitchAvailable(int swtch, SwitchContext context)
return true;
}
bool isAux1ModeAvailable(int mode)
{
#if defined(AUX2_SERIAL)
if (mode == UART_MODE_SBUS_TRAINER)
return g_eeGeneral.aux2SerialMode != UART_MODE_SBUS_TRAINER;
#endif
return true;
}
bool isAux2ModeAvailable(int mode)
{
#if defined(AUX_SERIAL)
if (mode == UART_MODE_SBUS_TRAINER)
return g_eeGeneral.auxSerialMode != UART_MODE_SBUS_TRAINER;
#endif
return true;
}
bool isSwitchAvailableInLogicalSwitches(int swtch)
{
return isSwitchAvailable(swtch, LogicalSwitchesContext);