Skip to content

Commit

Permalink
Housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
elecpower committed Jan 24, 2025
1 parent b7ea5e0 commit aa1ebab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions companion/src/firmwares/modeldata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1956,7 +1956,6 @@ QStringList ModelData::errorsList()
}

for (int i = 0; i < CPN_MAX_MIXERS; i++) {
// fix line # wrong !!!!!!
if (!mixData[i].isEmpty() && mixData[i].srcRaw == SOURCE_TYPE_NONE)
list.append(tr("Error - Mix: %1 Line: %2 %3").arg(mixData[i].destCh).arg(getMixLine(i)).arg(tr("has no source")));
}
Expand All @@ -1978,9 +1977,10 @@ int ModelData::getInputLine(int index) const
{
int cnt = 1;

for (int i = 0; i < index; i++)
for (int i = 0; i < index; i++) {
if (expoData[i].chn == expoData[index].chn)
cnt++;
}

return cnt;
}
5 changes: 3 additions & 2 deletions companion/src/firmwares/modeldata.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,9 @@ class ModelData {
void removeGlobalVar(int & var);

private:
int getMixLine(int index) const;
int getInputLine(int index) const;

QVector<UpdateReferenceParams> *updRefList = nullptr;

struct UpdateReferenceInfo
Expand Down Expand Up @@ -426,6 +429,4 @@ class ModelData {
value = swtch.toValue();
}
void updateResetParam(CustomFunctionData * cfd);
int getMixLine(int index) const;
int getInputLine(int index) const;
};

0 comments on commit aa1ebab

Please sign in to comment.