Snap frequency to FM step on spectrum/waterfall click when Step is enabled

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-05-25 12:45:43 +03:00
co-authored by Claude Sonnet 4.6
parent 9028a8dac0
commit 685370c91f
2 changed files with 6 additions and 2 deletions
+4 -1
View File
@@ -4659,7 +4659,10 @@ var
BandIdx: Integer;
begin
if PanelWidth <= 0 then Exit;
StepHz := 100;
if (FMode = MODE_FM) and FFMStepOn then
StepHz := FM_STEP_HZ[FFMStepIdx]
else
StepHz := 100;
ClickFreq := Round(FCenterFreq + (PixelX / PanelWidth - 0.5) * FSpanHz);
ClickFreq := (ClickFreq div StepHz) * StepHz;
if FActiveVfo = 0 then