From 5b6377cc1116399c1c99baa17214a4004844230c Mon Sep 17 00:00:00 2001 From: Denny Sheirer Date: Sun, 21 May 2023 06:12:11 -0400 Subject: [PATCH] #1558 Resolves issue where heterodyne channelizer allows tuning a set of channels that exceed the tuner's bandwidth. (#1561) Co-authored-by: Dennis Sheirer --- .../tuner/manager/CenterFrequencyCalculator.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/main/java/io/github/dsheirer/source/tuner/manager/CenterFrequencyCalculator.java b/src/main/java/io/github/dsheirer/source/tuner/manager/CenterFrequencyCalculator.java index e22410907..0f05652d4 100644 --- a/src/main/java/io/github/dsheirer/source/tuner/manager/CenterFrequencyCalculator.java +++ b/src/main/java/io/github/dsheirer/source/tuner/manager/CenterFrequencyCalculator.java @@ -1,6 +1,6 @@ /* * ***************************************************************************** - * Copyright (C) 2014-2022 Dennis Sheirer + * Copyright (C) 2014-2023 Dennis Sheirer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -123,17 +123,11 @@ public static long getCenterFrequency(TunerController tunerController, SortedSet /** * Indicates if channel along with all of the other currently sourced * channels can fit within the tunable bandwidth. - * - */ - /** - * - * Indicates if channel along with all of the other currently sourced - * channels can fit within the tunable bandwidth. * @param channel to test * @param tunerController that will provide the channel * @param channels is a current set of channels being sourced by the tuner controller - * @return + * @return true if it can tune all of the channels. */ public static boolean canTune(TunerChannel channel, TunerController tunerController, SortedSet channels) { @@ -149,7 +143,7 @@ public static boolean canTune(TunerChannel channel, TunerController tunerControl { SortedSet allChannels = new TreeSet<>(); - for(TunerChannel tunerChannel: allChannels) + for(TunerChannel tunerChannel: channels) { if(tunerChannel != null) {