1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-23 08:15:17 +03:00
This commit is contained in:
bsongis 2014-06-23 12:15:17 +02:00
parent 1febac7bf9
commit 2c6f28e422
4 changed files with 45 additions and 34 deletions

View file

@ -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