From 2c1ab897232fdcbf11a9a9cc74562a1d7221a517 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Wed, 24 May 2017 14:01:25 +0200 Subject: [PATCH] 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. --- src/common/sender.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; }