chore(dmr): remove diagnostic capture probes

This commit is contained in:
2026-07-14 20:42:48 +03:00
parent d794805081
commit 831045f37d
8 changed files with 2 additions and 652 deletions
-31
View File
@@ -32,7 +32,6 @@ const
type
TDMRAudioEvent = procedure(const PCM: array of Single; Count: Integer) of object;
TDMRBurstEvent = procedure(const Dibits: array of Byte; Count: Integer) of object;
TDMRSyncKind = (
dskNone,
@@ -70,11 +69,6 @@ type
SelectedSlot: Integer;
VoiceFrameCount: QWord;
VoiceErrorCount: QWord;
BestSyncDistance: Integer;
BestSyncPhase: Integer;
BestCandidateKind: TDMRSyncKind;
SymbolOuterLevel: Single;
SignalMean: Single;
end;
TDMRDecoder = class;
@@ -135,12 +129,8 @@ type
FLastSelectedVoiceTick: QWord;
FVoiceFrameCount, FVoiceErrorCount: QWord;
FOnAudio: TDMRAudioEvent;
FOnBurst: TDMRBurstEvent;
FBurstCount: QWord;
FRMSSq: Double;
FSignalMean: Double;
FBestSyncDistance, FBestSyncPhase: Integer;
FBestCandidateKind: TDMRSyncKind;
FSyncKind: TDMRSyncKind;
FInputInverted: Boolean;
@@ -178,7 +168,6 @@ type
class function SyncKindName(Kind: TDMRSyncKind): string; static;
property Enabled: Boolean read FEnabled;
property OnAudio: TDMRAudioEvent read FOnAudio write FOnAudio;
property OnBurst: TDMRBurstEvent read FOnBurst write FOnBurst;
end;
implementation
@@ -355,10 +344,6 @@ begin
FWindowSum := 0;
FSampleNo := 0;
FRMSSq := 0;
FSignalMean := 0;
FBestSyncDistance := 25;
FBestSyncPhase := -1;
FBestCandidateKind := dskNone;
FStatusLock.Enter;
try
FSyncKind := dskNone;
@@ -442,7 +427,6 @@ var
Sym: Double;
begin
FRMSSq := FRMSSq + 0.001 * (S * S - FRMSSq);
FSignalMean := FSignalMean + 0.001 * (S - FSignalMean);
FWindowSum := FWindowSum - FSampleWindow[FWindowPos] + S;
FSampleWindow[FWindowPos] := S;
FWindowPos := (FWindowPos + 1) mod DMR_INTEGRATOR_SAMPLES;
@@ -508,12 +492,6 @@ begin
if FHistoryCount[Phase] >= 24 then
begin
Distance := PopCount24(FSyncShift[Phase] xor Pat);
if Distance < FBestSyncDistance then
begin
FBestSyncDistance := Distance;
FBestSyncPhase := Phase;
FBestCandidateKind := SYNC_KIND[i];
end;
// Real on-air sync commonly carries one or two sign errors. DSD-FME
// likewise uses a bounded sync tolerance; requiring an exact 24-symbol
// match lost almost every superframe in recorded handheld-radio IQ.
@@ -737,7 +715,6 @@ procedure TDMRDecoder.CompleteBurst;
begin
Move(FCurrentBurst[0], FLastBurst[0], SizeOf(FLastBurst));
DMRParseBurst(FLastBurst, FLastBurstInfo);
if Assigned(FOnBurst) then FOnBurst(FLastBurst, Length(FLastBurst));
if FLastBurstInfo.SlotType.Valid and
(FSyncKind in [dskBSData, dskMSData, dskDirectTS1Data,
dskDirectTS2Data]) then
@@ -922,14 +899,6 @@ begin
S.SelectedSlot := FSelectedSlot;
S.VoiceFrameCount := FVoiceFrameCount;
S.VoiceErrorCount := FVoiceErrorCount;
S.BestSyncDistance := FBestSyncDistance;
S.BestSyncPhase := FBestSyncPhase;
S.BestCandidateKind := FBestCandidateKind;
if FFixedOuterLevel > 0 then
S.SymbolOuterLevel := FFixedOuterLevel
else if FBestSyncPhase >= 0 then
S.SymbolOuterLevel := FOuterLevel[FBestSyncPhase];
S.SignalMean := FSignalMean;
finally
FStatusLock.Leave;
end;