mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 20:37:33 +00:00
feat: QO-100 NB transponder bandplan overlay on spectrum
Add a thin colored strip along the bottom of the spectrum (above the ruler) showing the QO-100 narrow-band transponder bandplan: mode segments (CW ONLY / NB DIGI / DIGI / SSB / MIXED MODES) plus the three beacons (CW / PSK / EXP) as muted-red cells at their ranges. - New unit BandPlanOverlay.pas (TBandPlanOverlay), modelled on VfoOverlay: content rendered once into a cache bitmap, per-frame cost is just a constant-alpha composite (CPU) / one textured quad (GL). Cache invalidates only on view change (center/span/width) so it idles while the QO-100 downlink display is static. - Wired into both render paths: SpectrumView (CPU composite) and SpectrumViewOpengl (texture, re-uploaded only when dirty). - MainForm: SetView fed from SyncSpecViewFreq; visibility gated by InQO100 (Pluto + full-duplex transponder), like RX MUTE / BEACON. - DPI-robust: strip height scales with Screen.PixelsPerInch and the font height is tied to the strip height (not point size), so labels always fit at any Windows scaling. - Segment/beacon frequencies and colors are a single editable table. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+22
-1
@@ -22,7 +22,7 @@ unit MainForm;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, StrUtils, FreqDisplay, DeviceForm, VfoOverlay, SampleRateOverlay,
|
||||
Classes, SysUtils, StrUtils, FreqDisplay, DeviceForm, VfoOverlay, SampleRateOverlay, BandPlanOverlay,
|
||||
FlatButton, FlatSlider, FlatDropDown, AppTheme, Forms, Controls, Graphics, Dialogs,
|
||||
StdCtrls, ExtCtrls, Buttons, Menus, Math, Types,
|
||||
OpenGLContext,
|
||||
@@ -123,6 +123,7 @@ type
|
||||
FPendingIP: string; // IP устройства для подключения
|
||||
FVfoOverlay: TVfoOverlay; // накладка SmartSDR-стиль на спектре
|
||||
FSampleRateOverlay: TSampleRateOverlay; // оверлей span/hide слева вверху спектра
|
||||
FBandPlanOverlay: TBandPlanOverlay; // полоска бэндплана QO-100 внизу спектра
|
||||
FPanelHidden: Boolean; // True = левая панель скрыта
|
||||
FLeftPanelW: Integer; // ширина панели до скрытия (DPI-safe restore)
|
||||
FPendingBoardType: Integer; // BoardType устройства для подключения
|
||||
@@ -390,6 +391,7 @@ type
|
||||
procedure ApplyDUP(Active: Boolean);
|
||||
procedure BtnRxMuteClick(Sender: TObject);
|
||||
procedure UpdateRxMuteButton; // видимость (Pluto+full-duplex) + стиль кнопки RX MUTE
|
||||
procedure UpdateBandPlanOverlay; // вкл/выкл полоски бэндплана QO-100 по InQO100
|
||||
procedure BtnTUNClick(Sender: TObject);
|
||||
procedure ApplyTUN(Active: Boolean);
|
||||
procedure UpdateFilterButtons;
|
||||
@@ -1221,6 +1223,7 @@ begin
|
||||
UpdateBeaconButton;
|
||||
end;
|
||||
UpdateRxMuteButton; // RX MUTE — только Pluto + full-duplex (QO-100)
|
||||
UpdateBandPlanOverlay; // полоска бэндплана QO-100
|
||||
// Wideband-вид + web-зеркало xvtr (ранее в обёртках Activate/Deactivate).
|
||||
// rfXvtr эмитят ТОЛЬКО ActivateXvtr/DeactivateXvtr — состояние финальное.
|
||||
UpdateWidebandFrequencyView;
|
||||
@@ -2085,6 +2088,11 @@ begin
|
||||
FSampleRateOverlay.SetCurrentRate(FController.FSampleRate);
|
||||
FSpecView.SampleRateOverlay := FSampleRateOverlay;
|
||||
|
||||
// Бэндплан QO-100 — полоска внизу спектра; видимость по InQO100.
|
||||
FBandPlanOverlay := TBandPlanOverlay.Create(Self);
|
||||
FBandPlanOverlay.SetView(FController.FCenterFreq, FController.FSpanHz);
|
||||
FSpecView.BandPlanOverlay := FBandPlanOverlay;
|
||||
|
||||
// S-метр — внутри PanelToolbar, справа
|
||||
PanelSMeterRight := TPanel.Create(Self);
|
||||
PanelSMeterRight.Parent := PanelToolbar;
|
||||
@@ -3002,6 +3010,10 @@ begin
|
||||
// FSplitTxB (TX-A/TX-B), независимо от активного RX-VFO.
|
||||
if FController.FSplitTxB then FSpecView.TXVfoIndex := 1
|
||||
else FSpecView.TXVfoIndex := 0;
|
||||
// Бэндплан QO-100 следует за видом спектра (downlink-домен). SetView сам
|
||||
// отсекает неизменное → пересборки кэша на каждый вызов нет.
|
||||
if Assigned(FBandPlanOverlay) then
|
||||
FBandPlanOverlay.SetView(FController.FCenterFreq, FController.FSpanHz);
|
||||
if UpdateWidebandFrequencyView and FController.FShowWideband and (PbWideband <> nil) then
|
||||
PbWideband.Invalidate;
|
||||
end;
|
||||
@@ -3715,6 +3727,7 @@ begin
|
||||
LayoutLeftPanel(Caps.HasHWGain);
|
||||
if Caps.HasHWGain then UpdateRxGainUI;
|
||||
UpdateRxMuteButton; // RX MUTE — видимость по Pluto + full-duplex (если QO-100 уже активен)
|
||||
UpdateBandPlanOverlay; // полоска бэндплана QO-100
|
||||
end;
|
||||
|
||||
procedure TMainForm.DoConnectDevice(const Dev: THPSDRDevice);
|
||||
@@ -4066,6 +4079,14 @@ begin
|
||||
if Vis then StyleButton(BtnRxMute, FController.FRxMuteOnTx);
|
||||
end;
|
||||
|
||||
procedure TMainForm.UpdateBandPlanOverlay;
|
||||
// Полоска бэндплана видна только в QO-100 (Pluto + full-duplex транспондер).
|
||||
begin
|
||||
if FBandPlanOverlay = nil then Exit;
|
||||
FBandPlanOverlay.SetEnabled(FController.InQO100);
|
||||
FSpectrumDirty := True; // моментальная перерисовка (не ждём таймер)
|
||||
end;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// TUN — Thetis-style тон: WDSP TXA PostGen + MOX с отдельным уровнем Drive
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user