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

Save FFT plotter center frequency in settings #1274

Merged
merged 3 commits into from
Sep 26, 2023

Conversation

sn4kebite
Copy link
Contributor

Store the selected center frequency in the plotter as fft/fft_center. This will make the plotter center consistent on startup when zoomed in.

@argilo argilo added the feature label Sep 18, 2023
@argilo
Copy link
Member

argilo commented Sep 26, 2023

Thanks!

This seems to work well, and it fixes what was probably an unintended side effect of #1248 (namely, that the demod frequency would no longer be in view upon startup, because the zoom slider no longer used the demod frequency as its center).

sn4kebite and others added 2 commits September 26, 2023 18:43
Store the selected center frequency in the plotter as `fft/fft_center`.
This will make the plotter center consistent on startup when zoomed in.
@argilo
Copy link
Member

argilo commented Sep 26, 2023

The following undefined behaviour occurs on startup:

/home/argilo/prefix_310/src/gqrx/src/qtgui/plotter.cpp:918:56: runtime error: signed integer overflow: -9223372036854775808 - 1 cannot be represented in type 'long long int'

This looks to be due to an existing bug, where CPlotter::freqFromX performs a division by zero due to m_Size.width() and m_DPR being zero before the UI is rendered. I'll add a fix here.

@argilo argilo merged commit ccddc31 into gqrx-sdr:master Sep 26, 2023
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants