mirror of
https://github.com/EdgeTX/edgetx.git
synced 2025-07-24 00:35:14 +03:00
This takes care of connection sources to the right channels. BUt I have a terribel feeling that I must be duplicating code. This code just has to exist somewhere.
This commit is contained in:
parent
4c6cdd4ed5
commit
63bacf04f8
3 changed files with 12 additions and 2 deletions
|
@ -916,6 +916,15 @@ RawSource GeneralSettings::getDefaultSource(unsigned int channel) const
|
|||
return RawSource(SOURCE_TYPE_STICK, stick_index);
|
||||
}
|
||||
|
||||
int GeneralSettings::translateSource(unsigned int channel) const
|
||||
{
|
||||
for(int i=0; i<4; i++){
|
||||
if (chout_ar[4*templateSetup + i]==(channel+1))
|
||||
return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void FrSkyData::clear()
|
||||
{
|
||||
memset(this, 0, sizeof(FrSkyData));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue