mirror of
https://github.com/opentx/opentx.git
synced 2025-07-23 08:15:17 +03:00
Fixes #1352
This commit is contained in:
parent
1febac7bf9
commit
2c6f28e422
4 changed files with 45 additions and 34 deletions
|
@ -1366,20 +1366,26 @@ void drawStatusLine()
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
bool isInputAvailable(int input)
|
||||
{
|
||||
for (int i=0; i<MAX_EXPOS; i++) {
|
||||
ExpoData * expo = expoAddress(i);
|
||||
if (!EXPO_VALID(expo))
|
||||
break;
|
||||
if (expo->chn == input)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM)
|
||||
bool isSourceAvailable(int source)
|
||||
{
|
||||
#if defined(PCBTARANIS)
|
||||
if (source>=MIXSRC_FIRST_INPUT && source<=MIXSRC_LAST_INPUT) {
|
||||
int input = source - MIXSRC_FIRST_INPUT;
|
||||
for (int i=0; i<MAX_EXPOS; i++) {
|
||||
ExpoData * expo = expoAddress(i);
|
||||
if (!EXPO_VALID(expo))
|
||||
break;
|
||||
if (expo->chn == input)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return isInputAvailable(source - MIXSRC_FIRST_INPUT);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue