Notify about usage of channels that are next to each other

It is required to have at least one free channel between channels, to
avoid interferences.
This is only a warning, it will not reject channels next to each other.
This commit is contained in:
Andreas Eversberg 2017-05-24 14:01:25 +02:00
parent fc3b3e07be
commit 2c1ab89723
1 changed files with 6 additions and 0 deletions

View File

@ -70,6 +70,12 @@ int sender_create(sender_t *sender, int kanal, double sendefrequenz, double empf
rc = -EIO;
goto error;
}
if (abs(master->kanal - kanal) == 1) {
PDEBUG(DSENDER, DEBUG_NOTICE, "------------------------------------------------------------------------\n");
PDEBUG(DSENDER, DEBUG_NOTICE, "NOTE: Channel %d is next to channel %d. This will cause interferences.\n", kanal, master->kanal);
PDEBUG(DSENDER, DEBUG_NOTICE, "Please use at least one channel distance to avoid that.\n");
PDEBUG(DSENDER, DEBUG_NOTICE, "------------------------------------------------------------------------\n");
}
if (!strcmp(master->audiodev, audiodev))
break;
}