MCPcopy Create free account
hub / github.com/aethersdr/AetherSDR / driveVfoDragTune

Method driveVfoDragTune

src/gui/SpectrumWidget.cpp:6352–6361  ·  view source on GitHub ↗

Compute the slice target frequency under cursor X (offset-anchored, snapped) Tune the slice for the live, in-window drag path (cursor not at the edge). Deliberately routed through edgePanTuneRequested with the center UNCHANGED so the whole drag bypasses pan-follow/reveal: reveal is a position controller whose flag-extended trigger (#2761) fires asymmetrically a little inside the edge — inside our

Source from the content-addressed store, hash-verified

6350// MainWindow handler skips the redundant pan command when the center is
6351// unchanged. (user-reported)
6352void SpectrumWidget::driveVfoDragTune(int mx, const char* phase)
6353{
6354 const double mhz = snapToStep(xToMhz(mx) - m_vfoDragOffsetHz / 1.0e6, m_stepHz);
6355 qCDebug(lcPerf).nospace()
6356 << "SliceDrag phase=" << phase
6357 << " mx=" << mx << " w=" << width()
6358 << " center=" << m_centerMhz << " bw=" << m_bandwidthMhz
6359 << " tuneMhz=" << mhz;
6360 emit edgePanTuneRequested(m_centerMhz, mhz);
6361}
6362
6363// Start the edge-pan velocity timer while the cursor sits in the edge zone
6364// (within kVfoDragEdgeZoneFrac of either border), stop it otherwise. Returns

Callers

nothing calls this directly

Calls 1

snapToStepFunction · 0.85

Tested by

no test coverage detected