mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 20:37:33 +00:00
feat: Pluto/AD936x SDR backend (discovery, RX, VHF band plan)
Add ADALM-Pluto / AD9361 support as a second hardware backend alongside openHPSDR, sharing the WDSP DSP pipeline and the existing controller API (UI stays decoupled from logic). - RadioBackend.pas: abstract TRadioBackend + TBackendCaps + TRadioDevice (Kind/URI/Serial). THPSDRNetwork now derives from it (state via virtual getters); TRadioController.FNetwork is the base type. - IIOBindings.pas: dynamic libiio loader (runs without libiio present). - PlutoBackend.pas: scan/probe-by-URI, connect, LO/rate/bandwidth/gain control, RX streaming thread (int16->24bit BE -> OnDDCIQ), Q conjugated to match WDSP IQ convention. Verified on LibreSDR (AD9361) over network. - Unified discovery: TDiscoverThread scans both backends; network Plutos found via direct ProbeURI (no mDNS needed). ConnectDevice dispatches by Dev.Kind (EnsureBackend swaps backend, preserving callbacks). - DeviceStore/DeviceForm: persist Kind/URI/Serial; save Pluto via AddSavedPluto so saved/autostart devices reconnect across restarts. - VHF/UHF band plan (BoardUtils, kind-aware): 6m..ADS-B for Pluto; fixes HF clamps (band detect, mouse-wheel 60 MHz cap, freq-display max). - SampleRateOverlay: configurable presets (Pluto 576k..5760k, >520 ksps), auto-width to fit. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+15
-2
@@ -7,7 +7,7 @@ interface
|
||||
uses
|
||||
Classes, SysUtils, FlatButton, FlatEdit, FlatListBox, AppTheme, Forms, Controls, Graphics, Dialogs,
|
||||
StdCtrls, ExtCtrls, ComCtrls,
|
||||
BoardUtils, PlatformUtils, DeviceStore;
|
||||
BoardUtils, PlatformUtils, DeviceStore, RadioBackend;
|
||||
|
||||
type
|
||||
// Результат диалога
|
||||
@@ -86,6 +86,9 @@ type
|
||||
function GetAutoStartBoardType: Integer;
|
||||
function GetSavedBoardType(Idx: Integer): Integer;
|
||||
|
||||
// Текст поля ручного ввода IP/URI (для probe сетевых Pluto при discovery).
|
||||
function ManualIP: string;
|
||||
|
||||
// Получить/сбросить результат
|
||||
procedure ClearResult;
|
||||
// Общее хранилище устройств — назначается владельцем (MainForm/контроллер)
|
||||
@@ -466,7 +469,12 @@ begin
|
||||
Exit;
|
||||
end;
|
||||
D := FStore.Discovered(Idx);
|
||||
NewIdx := FStore.AddSaved(D.DisplayName, D.IPAddress, D.BoardType);
|
||||
// Pluto сохраняем с Kind/URI/Serial (иначе после перезапуска резолвится как
|
||||
// HPSDR по голому IP и не подключается).
|
||||
if D.Kind = bkPluto then
|
||||
NewIdx := FStore.AddSavedPluto('PlutoSDR', D.URI, D.Serial)
|
||||
else
|
||||
NewIdx := FStore.AddSaved(D.DisplayName, D.IPAddress, D.BoardType);
|
||||
RefreshSavedList;
|
||||
LstSaved.ItemIndex := NewIdx;
|
||||
end;
|
||||
@@ -518,6 +526,11 @@ begin
|
||||
ModalResult := mrCancel;
|
||||
end;
|
||||
|
||||
function TDeviceDialog.ManualIP: string;
|
||||
begin
|
||||
if EdIP <> nil then Result := Trim(EdIP.Text) else Result := '';
|
||||
end;
|
||||
|
||||
procedure TDeviceDialog.ClearResult;
|
||||
begin
|
||||
FResult.Accepted := False;
|
||||
|
||||
Reference in New Issue
Block a user