mirror of
https://github.com/DSheirer/sdrtrunk.git
synced 2026-11-12 08:37:25 -05:00
C4FM now uses SIMD differential decoding and soft sync detection. LSM updated with soft sync detector and retains original Gardner error detector. Adds new QPSK symbol view in the now playing channel tab. Restores PLL error driven tuner Auto-PPM feature. Deletes the demod viewer GUI application and all instrumented decoders Updates DMR to send soft symbols to new symbol view in Now Playing. Co-authored-by: Dennis Sheirer <dsheirer@github.com>
This commit is contained in:
@@ -1,23 +1,20 @@
|
||||
/*
|
||||
* *****************************************************************************
|
||||
* Copyright (C) 2014-2025 Dennis Sheirer
|
||||
*
|
||||
* * ******************************************************************************
|
||||
* * Copyright (C) 2014-2020 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
|
||||
* * the Free Software Foundation, either version 3 of the License, or
|
||||
* * (at your option) any later version.
|
||||
* *
|
||||
* * This program is distributed in the hope that it will be useful,
|
||||
* * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* * GNU General Public License for more details.
|
||||
* *
|
||||
* * You should have received a copy of the GNU General Public License
|
||||
* * along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
* * *****************************************************************************
|
||||
* 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
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
* ****************************************************************************
|
||||
*/
|
||||
|
||||
package io.github.dsheirer.module.decode;
|
||||
@@ -30,9 +27,16 @@ import io.github.dsheirer.source.SourceEvent;
|
||||
* Decoder that provides feedback to signal source(s) via SourceEvent broadcasts and supports registering source
|
||||
* event listeners.
|
||||
*/
|
||||
public abstract class FeedbackDecoder extends Decoder implements ISourceEventProvider
|
||||
public abstract class FeedbackDecoder extends PrimaryDecoder implements ISourceEventProvider
|
||||
{
|
||||
private Listener<SourceEvent> mSourceEventListener;
|
||||
private Listener<Float> mSymbolListener;
|
||||
|
||||
/**
|
||||
* Protocol description suitable for display in the user interface
|
||||
* @return description
|
||||
*/
|
||||
public abstract String getProtocolDescription();
|
||||
|
||||
/**
|
||||
* Registers the listener to receive source events from this decoder
|
||||
@@ -62,4 +66,43 @@ public abstract class FeedbackDecoder extends Decoder implements ISourceEventPro
|
||||
mSourceEventListener.receive(sourceEvent);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes the current phase-locked loop (PLL) measurement and sends to the parent tuner for self correction.
|
||||
* @param pllError as measured in the decoder.
|
||||
*/
|
||||
public void processPLLError(float pllError, int baudRate)
|
||||
{
|
||||
long frequencyError = (long)(baudRate / 2.0 * (pllError / Math.PI));
|
||||
broadcast(SourceEvent.frequencyErrorMeasurementSyncLocked(frequencyError, "Decoder measured error sync locked"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the listener to receive demodulated symbols.
|
||||
* @param listener to receive symbols.
|
||||
*/
|
||||
public void setSymbolListener(Listener<Float> listener)
|
||||
{
|
||||
mSymbolListener = listener;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes any registered symbol listener
|
||||
*/
|
||||
public void removeSymbolListener()
|
||||
{
|
||||
mSymbolListener = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Broadcasts the demodulated symbol to a symbol listener.
|
||||
* @param symbol in range 0 to +/- PI radians
|
||||
*/
|
||||
public void broadcast(float symbol)
|
||||
{
|
||||
if(mSymbolListener != null)
|
||||
{
|
||||
mSymbolListener.receive(symbol);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user