Skip to content

Commit

Permalink
only change tuning ranges when the beginning of the tuning interval i…
Browse files Browse the repository at this point in the history
…s greater than the end of the current range.
  • Loading branch information
anarkiwi committed Jun 17, 2023
1 parent 59e3453 commit 037a411
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/retune_fft_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ namespace gr {
tune_freq_ += tune_step_hz_;
if (last_sweep_start_ == 0) {
last_sweep_start_ = host_now;
} else if (tune_freq_ > tuning_ranges_[tuning_range_].second) {
} else if (tune_freq_ - (samp_rate_ / 2) > tuning_ranges_[tuning_range_].second) {
tuning_range_ = (tuning_range_ + 1) % tuning_ranges_.size();
d_logger->debug("moving to tuning range {}", tuning_range_);
tune_freq_ = tuning_ranges_[tuning_range_].first;
Expand Down

0 comments on commit 037a411

Please sign in to comment.