mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-05 00:41:17 -05:00
Fix bad frequency jumps at zoomed freq <= 1/2 samplerate
This commit is contained in:
parent
8c53bde031
commit
798c558c09
@ -146,6 +146,11 @@ void WaterfallCanvas::OnPaint(wxPaintEvent& WXUNUSED(event)) {
|
||||
if (freqMove != 0.0) {
|
||||
long long newFreq = getCenterFrequency() + (long long)((long double)getBandwidth()*freqMove) * 0.01;
|
||||
|
||||
long long minFreq = bandwidth/2;
|
||||
if (newFreq < minFreq) {
|
||||
newFreq = minFreq;
|
||||
}
|
||||
|
||||
updateCenterFrequency(newFreq);
|
||||
|
||||
if (!freqMoving) {
|
||||
@ -434,7 +439,7 @@ void WaterfallCanvas::OnKeyDown(wxKeyEvent& event) {
|
||||
return;
|
||||
}
|
||||
|
||||
long long minFreq = wxGetApp().getSampleRate()/2;
|
||||
long long minFreq = bandwidth/2;
|
||||
if (freq < minFreq) {
|
||||
freq = minFreq;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user