Skip to content

Commit

Permalink
Merge pull request #82 from anarkiwi/range
Browse files Browse the repository at this point in the history
only change tuning ranges when the beginning of the tuning interval i…
  • Loading branch information
anarkiwi authored Jun 17, 2023
2 parents 59e3453 + 037a411 commit a8be173
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 a8be173

Please sign in to comment.