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

AbstractWaterfall: avoid display jitter on retune #37

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Changes from all commits
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
12 changes: 7 additions & 5 deletions AbstractWaterfall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ void AbstractWaterfall::mouseMoveEvent(QMouseEvent* event)
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
if (event->buttons() & (Qt::LeftButton | Qt::MiddleButton))
#else
if (event->buttons() & (Qt::LeftButton | Qt::MidButton))
if (event->buttons() & (Qt::LeftButton | Qt::MidButton))
#endif // QT_VERSION
{
setCursor(QCursor(Qt::ClosedHandCursor));
Expand All @@ -349,10 +349,12 @@ void AbstractWaterfall::mouseMoveEvent(QMouseEvent* event)
m_CenterFreq += delta_hz;
m_DemodCenterFreq += delta_hz;

////////////// TODO: Edit this to fake spectrum scroll /////////
////////////// DONE: Something like this:
///
m_tentativeCenterFreq += delta_hz;
// Scroll the spectrum only if data flow is stopped.
// When running, the hardware may be delayed in retuning, so some new
// PSDs at the old centre frequency may still arrive, causing visual
// jumping/shaking of the spectrum.
if (!m_Running)
m_tentativeCenterFreq += delta_hz;

if (delta_hz != 0)
emit newCenterFreq(m_CenterFreq);
Expand Down
Loading