#7 NXDN Decoder support. Redesigns tuner and channel frequency error management. (#2431)

Closes #7 

NXDN Decoder

* Implements: NXDN4800, NXDN9600, Type-C and Type-D decoding and trunk tracking.
* Redesigns tuner and channel frequency error management.
This commit is contained in:
Denny Sheirer
2026-07-08 03:44:08 -04:00
committed by GitHub
parent a053315675
commit 7945f0ce63
445 changed files with 30854 additions and 2053 deletions

View File

@@ -1,6 +1,6 @@
/*
* *****************************************************************************
* Copyright (C) 2014-2025 Dennis Sheirer
* Copyright (C) 2014-2026 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -31,6 +31,7 @@ public class SourceEvent
NOTIFICATION_CHANNEL_COUNT_CHANGE,
NOTIFICATION_CHANNEL_FREQUENCY_CORRECTION,
NOTIFICATION_CHANNEL_FREQUENCY_CORRECTION_CHANGE,
NOTIFICATION_CHANNEL_FREQUENCY_CORRECTION_STATUS,
NOTIFICATION_CHANNEL_POWER,
NOTIFICATION_CHANNEL_SAMPLE_RATE_CHANGE,
NOTIFICATION_FREQUENCY_AND_SAMPLE_RATE_LOCKED,
@@ -40,7 +41,6 @@ public class SourceEvent
NOTIFICATION_FREQUENCY_ROTATION_SUCCESS,
NOTIFICATION_FREQUENCY_ROTATION_FAILURE,
NOTIFICATION_MEASURED_FREQUENCY_ERROR,
NOTIFICATION_MEASURED_FREQUENCY_ERROR_SYNC_LOCKED,
NOTIFICATION_CARRIER_OFFSET_FREQUENCY,
NOTIFICATION_RECORDING_FILE_LOADED,
NOTIFICATION_SAMPLE_RATE_CHANGE,
@@ -51,6 +51,7 @@ public class SourceEvent
NOTIFICATION_ERROR_STATE,
REQUEST_FREQUENCY_CHANGE,
REQUEST_FREQUENCY_CORRECTION,
REQUEST_FREQUENCY_ROTATION,
REQUEST_FREQUENCY_SELECTION,
REQUEST_CHANGE_SQUELCH_THRESHOLD,
@@ -66,15 +67,15 @@ public class SourceEvent
EnumSet.range(NOTIFICATION_CHANNEL_COUNT_CHANGE, NOTIFICATION_SAMPLE_RATE_CHANGE);
}
private Event mEvent;
private Number mValue;
private final Event mEvent;
private final Number mValue;
private Source mSource;
private String mEventDescription;
private final String mEventDescription;
/**
* Private constructor. Use the static constructor methods to create an event.
*/
private SourceEvent(Event event, Source source, Number value, String eventDescription)
public SourceEvent(Event event, Source source, Number value, String eventDescription)
{
mEvent = event;
mSource = source;
@@ -244,6 +245,16 @@ public class SourceEvent
return new SourceEvent(Event.NOTIFICATION_FREQUENCY_CORRECTION_CHANGE, frequencyCorrection);
}
/**
* Creates a new frequency correction request emitted by the FeedbackDecoder
*
* @param correction in hertz
*/
public static SourceEvent frequencyCorrectionRequest(long correction)
{
return new SourceEvent(Event.REQUEST_FREQUENCY_CORRECTION, correction);
}
/**
* Creates a new carrier offset measurement notification event.
*
@@ -264,18 +275,6 @@ public class SourceEvent
return new SourceEvent(Event.NOTIFICATION_MEASURED_FREQUENCY_ERROR, frequencyError);
}
/**
* Creates a new frequency error measurement notification event. This event is different from
* the raw frequency error measurement and indicates that the current state of the PLL is
* locked and tracking the signal.
*
* @param frequencyError in hertz
*/
public static SourceEvent frequencyErrorMeasurementSyncLocked(long frequencyError, String eventDescription)
{
return new SourceEvent(Event.NOTIFICATION_MEASURED_FREQUENCY_ERROR_SYNC_LOCKED, frequencyError, eventDescription);
}
/**
* Creates a new sample rate change event
*