mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 20:37:33 +00:00
feat(spectrum): zoom + pan для спектра и водопада (WDSP span-clip)
Зум через нативный span-clip WDSP (fscLin/fscHin в SetAnalyzer): clp=0, видимое окно сужается клипом, при зуме 0 полоса == sample rate (старое поведение сохранено). Конвенция как в Thetis: ZoomFactor 0=без зума..1=макс. - WDSPEngine: SetZoomPan + расчёт span-clip, ViewLowHz/ViewHighHz. - RadioController: GetViewWindow (единая истина видимого окна для оверлеев и мыши), ApplyZoom, ZoomIn/Out по лестнице кратностей, ZoomDefault. Якорь зума кнопками — на маркере активного VFO. rfZoom. - Per-band персист зума/пана (TBandSettings + Save/Load/Restore). - MainForm: маршрутизация оверлеев/кликов через GetViewWindow (покрывает CPU и OpenGL), резерв строки PANZOOM_H в layout + сплиттере, rfZoom-рендер. - WebAdapter: web-спектр/наведение на view-окно (делит те же WDSP-пиксели). - PanZoomBar (новый): нижняя полоса = линейка полного диапазона (частоты + деления), поверх окно-селектор «стекло» (полупрозрачное, объёмная фаска). Середина=пан, края=зум, клик мимо=центрировать, двойной клик=сброс. Сборка ewsdr (--ws=qt6) и ewsdrd — ОК. На железе не проверено. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+12
-7
@@ -369,13 +369,14 @@ procedure TWebAdapter.OnBeaconSeed(Frac: Double);
|
||||
begin FSyncFreq := Frac; FController.Invoke(@SyncBeaconSeed); end;
|
||||
|
||||
procedure TWebAdapter.SyncBeaconSeed;
|
||||
var Hz: Double;
|
||||
var Hz, VC, VS: Double;
|
||||
begin
|
||||
// Frac (доля 0..1 по ширине спектра) → абс. display-Hz от ЖИВЫХ центра/спана
|
||||
// контроллера (зеркалит десктоп PixelToFreq(X,W,FCenterFreq,FSpanHz)). Так
|
||||
// наведение точно, даже когда LO ретюнится локом и клиентский center отстаёт.
|
||||
// Frac (доля 0..1 по ширине спектра) → абс. display-Hz от ЖИВОГО видимого окна
|
||||
// контроллера (зеркалит десктоп PixelToFreq с учётом зума). Так наведение
|
||||
// точно, даже когда LO ретюнится локом и клиентский center отстаёт.
|
||||
if (FSyncFreq < 0) or (FSyncFreq > 1) then Exit;
|
||||
Hz := FController.FCenterFreq + (FSyncFreq - 0.5) * FController.FSpanHz;
|
||||
FController.GetViewWindow(VC, VS);
|
||||
Hz := VC + (FSyncFreq - 0.5) * VS;
|
||||
FController.BeaconSeedAtHz(Hz);
|
||||
end;
|
||||
|
||||
@@ -466,7 +467,11 @@ procedure TWebAdapter.PushState;
|
||||
var
|
||||
StatusText, BoardText, IPText, SupplyText: string;
|
||||
PLLText, RXText, TXText, SeqText: string;
|
||||
ViewCenter, ViewSpan: Double;
|
||||
begin
|
||||
// Видимое окно (центр+span) с учётом зума: пиксели спектра уже зумлены
|
||||
// анализатором, web-метки/маппинг должны соответствовать.
|
||||
FController.GetViewWindow(ViewCenter, ViewSpan);
|
||||
if FController.FNetwork.Connected then
|
||||
begin
|
||||
if FController.FRunning then StatusText := 'Running'
|
||||
@@ -558,13 +563,13 @@ begin
|
||||
FController.FWaterfallBuf,
|
||||
FController.FLastSMeter,
|
||||
FController.FVfoA, FController.FMode, FController.FFilterBW, FController.FAGCMode, FController.FAGCTop,
|
||||
FController.FSpanHz, FController.FVolume,
|
||||
ViewSpan, FController.FVolume,
|
||||
FController.FWfAGCEnabled, FController.FWfNFEnabled,
|
||||
FController.FCurrentBand,
|
||||
FController.FRunning and FController.FNetwork.Connected,
|
||||
FController.FRunning, FController.FMuted, FController.FCTun,
|
||||
FController.FNRMode, FController.FNBMode, FController.FSNB, FController.FANF,
|
||||
FController.FCenterFreq, FController.FFilter,
|
||||
ViewCenter, FController.FFilter,
|
||||
FController.FVfoB, FController.FActiveVfo,
|
||||
FController.FTransmitting, FController.FDrivePercent,
|
||||
FController.FAtten, FController.FTuning, FController.FDisplayDuplex,
|
||||
|
||||
Reference in New Issue
Block a user