mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 20:37:33 +00:00
chore(dmr): remove diagnostic capture probes
This commit is contained in:
@@ -50,7 +50,6 @@ uses
|
||||
Classes, SysUtils, Math,
|
||||
HPSDRProtocol, HPSDRNetwork, RadioBackend, PlutoBackend, IIOBindings,
|
||||
WDSPEngine, AudioOutput, AudioInput, BeaconDecoder, BeaconFEC, DMRDecoder,
|
||||
DMRDiagnostics,
|
||||
Settings, ChannelStore, FMRepeater, BoardUtils, DeviceStore;
|
||||
|
||||
// Панадаптеры (этап 3): потолок MAX_PANS живёт в WDSPEngine (общий для
|
||||
@@ -273,7 +272,6 @@ type
|
||||
|
||||
// ---- DMR 4FSK receive decoder ----
|
||||
FDMRDec: TDMRDecoder; // 48 kHz FM discriminator -> DMR worker
|
||||
FDMRDiag: TDMRDiagnosticCapture; // bounded async IQ/demod/burst recorder
|
||||
|
||||
// ---- Аудио / TX ----
|
||||
FVolume: Integer; // громкость RX
|
||||
@@ -429,7 +427,6 @@ type
|
||||
procedure OnAudioReady(const Left, Right: array of Single; Count: Integer);
|
||||
procedure OnDemodAudioReady(const Left, Right: array of Single; Count: Integer);
|
||||
procedure OnDMRAudioReady(const PCM: array of Single; Count: Integer);
|
||||
procedure OnDMRBurstReady(const Dibits: array of Byte; Count: Integer);
|
||||
procedure OnSpectrumReady(const Pixels: array of Single; Count: Integer);
|
||||
procedure OnWaterfallReady(const Pixels: array of Single; Count: Integer);
|
||||
procedure OnMicPacket(const Data: TMicDataPacket);
|
||||
@@ -700,9 +697,6 @@ type
|
||||
function GetBeaconScope(out S: TBeaconScope): Boolean;
|
||||
function GetBeaconFrame(out Frame: TBeaconFrame; out RSErrors: Integer): Boolean;
|
||||
function GetDMRStatus(out S: TDMRStatus): Boolean;
|
||||
function StartDMRDiagnostics(DurationSeconds: Integer = 15): string;
|
||||
procedure StopDMRDiagnostics;
|
||||
function DMRDiagnosticsActive: Boolean;
|
||||
|
||||
// Отображение / приём
|
||||
procedure SetCTun(On_: Boolean);
|
||||
@@ -833,7 +827,6 @@ begin
|
||||
begin
|
||||
FDecoder.SetEnabled(False);
|
||||
FDecoder.OnAudio := nil;
|
||||
FDecoder.OnBurst := nil;
|
||||
FreeAndNil(FDecoder);
|
||||
end;
|
||||
FOwner := nil;
|
||||
@@ -916,14 +909,12 @@ begin
|
||||
FDSPEngine.SetBeaconDecoder(FBeaconDec);
|
||||
|
||||
// DMR front-end owns a worker thread. It stays idle until MODE_DMR is active.
|
||||
FDMRDiag := TDMRDiagnosticCapture.Create;
|
||||
FDMRDec := TDMRDecoder.Create;
|
||||
// WDSP's FM discriminator polarity on the EWSDR RX path is opposite to the
|
||||
// DMR dibit convention: captured handheld MS voice sync appears as MS data
|
||||
// without this inversion (the two sync words are complements).
|
||||
FDMRDec.SetInverted(True);
|
||||
FDMRDec.OnAudio := OnDMRAudioReady;
|
||||
FDMRDec.OnBurst := OnDMRBurstReady;
|
||||
|
||||
// Audio out/in — объекты создаём сейчас, Open вызывается позже (после показа
|
||||
// формы / при подключении устройства).
|
||||
@@ -946,10 +937,8 @@ begin
|
||||
begin
|
||||
FDMRDec.SetEnabled(False);
|
||||
FDMRDec.OnAudio := nil;
|
||||
FDMRDec.OnBurst := nil;
|
||||
FreeAndNil(FDMRDec);
|
||||
end;
|
||||
FreeAndNil(FDMRDiag);
|
||||
if Assigned(FNetwork) then
|
||||
begin
|
||||
if FNetwork.Connected then FNetwork.Disconnect;
|
||||
@@ -1070,9 +1059,6 @@ begin
|
||||
SamplesPerFrame := (Integer(Data.SamplesPerFrame[0]) shl 8) or
|
||||
Integer(Data.SamplesPerFrame[1]);
|
||||
if SamplesPerFrame <= 0 then SamplesPerFrame := 238; // fallback
|
||||
if (DDCIndex = FActiveDDC) and (FMode = MODE_DMR) and
|
||||
Assigned(FDMRDiag) and FDMRDiag.Active then
|
||||
FDMRDiag.FeedIQ24BE(Data.IQData, SamplesPerFrame * 6);
|
||||
if DDCIndex = FActiveDDC then
|
||||
FDSPEngine.PushDDCPacket(Data.IQData, 0, SamplesPerFrame)
|
||||
else if (DDCIndex >= 0) and (DDCIndex < MAX_DDCS)
|
||||
@@ -1278,8 +1264,6 @@ begin
|
||||
if not Assigned(FDMRDec) then Exit;
|
||||
if FMode = MODE_DMR then
|
||||
begin
|
||||
if Assigned(FDMRDiag) and FDMRDiag.Active then
|
||||
FDMRDiag.FeedDemod(Left, Right, Count);
|
||||
if not FDMRDec.Enabled then FDMRDec.SetEnabled(True);
|
||||
FDMRDec.FeedAudio(Left, Right, Count);
|
||||
end
|
||||
@@ -1287,13 +1271,6 @@ begin
|
||||
FDMRDec.SetEnabled(False);
|
||||
end;
|
||||
|
||||
procedure TRadioController.OnDMRBurstReady(const Dibits: array of Byte;
|
||||
Count: Integer);
|
||||
begin
|
||||
if Assigned(FDMRDiag) and FDMRDiag.Active then
|
||||
FDMRDiag.FeedBurst(Dibits, Count);
|
||||
end;
|
||||
|
||||
procedure TRadioController.OnDMRAudioReady(const PCM: array of Single;
|
||||
Count: Integer);
|
||||
// DMR worker thread, 8 kHz mono from mbelib. Linear 6x interpolation brings
|
||||
@@ -2403,23 +2380,6 @@ begin
|
||||
else FillChar(S, SizeOf(S), 0);
|
||||
end;
|
||||
|
||||
function TRadioController.StartDMRDiagnostics(DurationSeconds: Integer): string;
|
||||
begin
|
||||
if not Assigned(FDMRDiag) then Exit('');
|
||||
Result := FDMRDiag.Start(DurationSeconds, FSampleRate, FCenterFreq,
|
||||
ActiveVfoHz);
|
||||
end;
|
||||
|
||||
procedure TRadioController.StopDMRDiagnostics;
|
||||
begin
|
||||
if Assigned(FDMRDiag) then FDMRDiag.Stop;
|
||||
end;
|
||||
|
||||
function TRadioController.DMRDiagnosticsActive: Boolean;
|
||||
begin
|
||||
Result := Assigned(FDMRDiag) and FDMRDiag.Active;
|
||||
end;
|
||||
|
||||
// Кромки полосы под режим/полосу (единый расчёт для главного канала и слайсов).
|
||||
class procedure TRadioController.FilterEdgesFor(Mode, BW: Integer; out Lo, Hi: Integer);
|
||||
var Half: Integer;
|
||||
|
||||
Reference in New Issue
Block a user