Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix quick_tune parameter error when calling set_frequency on BladeRF1 #883

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions host/libraries/libbladeRF/src/board/bladerf1/bladerf1.c
Original file line number Diff line number Diff line change
Expand Up @@ -2066,8 +2066,19 @@ static int bladerf1_set_frequency(struct bladerf *dev,
break;

case BLADERF_TUNING_MODE_FPGA: {
status = dev->board->schedule_retune(dev, ch, BLADERF_RETUNE_NOW,
frequency, NULL);
if (attached == BLADERF_XB_200) {
bladerf_quick_tune qt;
status = bladerf_get_quick_tune(dev, ch, &qt);
if (status != 0) {
return status;
}

status = dev->board->schedule_retune(dev, ch, BLADERF_RETUNE_NOW, 0, &qt);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance this right curly bracket } can be on the same line as the else statement?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to make sense of this. If the XB200 is attached, how does bladerf_get_quick_tune() return a bladerf_quick_tune that is for the correct new frequency?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant to fix this issue: #882
But i do not have equipment here to retest at the moment. Maybe i do not understand the error correctly.

else {
status = dev->board->schedule_retune(dev, ch, BLADERF_RETUNE_NOW, frequency, NULL);
}

break;
}

Expand Down