mirror of
https://github.com/opentx/opentx.git
synced 2025-07-21 07:15:12 +03:00
Fixes #1052
This commit is contained in:
parent
c1d57f0b0c
commit
573858552c
3 changed files with 18 additions and 3 deletions
|
@ -1003,6 +1003,17 @@ ExpoData * ModelData::insertInput(const int idx)
|
|||
return &expoData[idx];
|
||||
}
|
||||
|
||||
bool ModelData::isInputValid(const unsigned int idx) const
|
||||
{
|
||||
for (int i=0; i<C9X_MAX_EXPOS; i++) {
|
||||
const ExpoData * expo = &expoData[i];
|
||||
if (expo->mode == 0) break;
|
||||
if (expo->chn == idx)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void ModelData::removeInput(const int idx)
|
||||
{
|
||||
memmove(&expoData[idx], &expoData[idx+1], (C9X_MAX_EXPOS-(idx+1))*sizeof(ExpoData));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue