diff options
author | Andreas Eversberg <jolly@eversberg.eu> | 2017-05-24 14:01:25 +0200 |
---|---|---|
committer | Andreas Eversberg <jolly@eversberg.eu> | 2017-05-24 14:01:25 +0200 |
commit | 2c1ab897232fdcbf11a9a9cc74562a1d7221a517 (patch) | |
tree | 9c79523defa6d5736354d03a81ce068908fd22e9 | |
parent | fc3b3e07be34b1daacd968a9a9e4be5b6db7818e (diff) |
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.
-rw-r--r-- | src/common/sender.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/sender.c b/src/common/sender.c index 6d69e63..88e48c1 100644 --- a/src/common/sender.c +++ b/src/common/sender.c @@ -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; } |