support protocol2
This commit is contained in:
@@ -448,7 +448,7 @@ bool DataEngine::startDataEngineWithoutConnection() {
|
||||
if (!m_dataProcessor) createDataProcessor();
|
||||
|
||||
// data receiver thread
|
||||
if (!startDataIO(QThread::NormalPriority)) {
|
||||
if (!startDataIO(QThread::HighestPriority)) {
|
||||
|
||||
setSystemState(QSDR::DataReceiverThreadError, m_hwInterface, m_serverMode, QSDR::DataEngineDown);
|
||||
return false;
|
||||
@@ -562,8 +562,28 @@ bool DataEngine::findHPSDRDevices() {
|
||||
set->setPennyLanePresence(false);
|
||||
set->setExcaliburPresence(false);
|
||||
set->setAlexPresence(currentDevice.hasAlex0 || currentDevice.hasAlex1);
|
||||
if (!currentDevice.widebandData && set->getWidebandData())
|
||||
set->setWidebandData(this, false);
|
||||
if (currentDevice.ddcCount > 0 && set->getNumberOfReceivers() > currentDevice.ddcCount)
|
||||
set->setReceivers(this, currentDevice.ddcCount);
|
||||
if (currentDevice.maxDdcSampleRateKsps > 0 || currentDevice.minDdcSampleRateKsps > 0) {
|
||||
const int supportedRates[] = {48000, 96000, 192000, 384000, 768000, 1536000};
|
||||
const int minRate = currentDevice.minDdcSampleRateKsps > 0 ? currentDevice.minDdcSampleRateKsps * 1000 : 48000;
|
||||
const int maxRate = currentDevice.maxDdcSampleRateKsps > 0 ? currentDevice.maxDdcSampleRateKsps * 1000 : 1536000;
|
||||
int fallbackRate = 0;
|
||||
for (unsigned int i = 0; i < sizeof(supportedRates) / sizeof(supportedRates[0]); ++i) {
|
||||
if (supportedRates[i] >= minRate && supportedRates[i] <= maxRate) {
|
||||
if (fallbackRate == 0)
|
||||
fallbackRate = supportedRates[i];
|
||||
if (supportedRates[i] <= set->getSampleRate())
|
||||
fallbackRate = supportedRates[i];
|
||||
}
|
||||
}
|
||||
if (fallbackRate == 0)
|
||||
fallbackRate = 48000;
|
||||
if (set->getSampleRate() < minRate || set->getSampleRate() > maxRate)
|
||||
set->setSampleRate(this, fallbackRate);
|
||||
}
|
||||
io.hermesFW = set->getCurrentMetisCard().firmwareVersion;
|
||||
set->setHermesVersion(io.hermesFW);
|
||||
return true;
|
||||
@@ -630,7 +650,7 @@ bool DataEngine::getFirmwareVersions() {
|
||||
}
|
||||
|
||||
// data IO thread
|
||||
if (!startDataIO(QThread::NormalPriority)) {// ::NormalPriority)) {
|
||||
if (!startDataIO(QThread::HighestPriority)) {// ::NormalPriority)) {
|
||||
|
||||
DATA_ENGINE_DEBUG << "data IO thread could not be started.";
|
||||
return false;
|
||||
@@ -640,9 +660,12 @@ bool DataEngine::getFirmwareVersions() {
|
||||
SleeperThread::msleep(100);
|
||||
|
||||
// pre-conditioning
|
||||
for (int i = 0; i < io.receivers; i++)
|
||||
invokeDataIOInitFrame(m_dataIO, i);
|
||||
|
||||
const bool protocol2Active = (set->getCurrentMetisCard().protocolVersion >= 2);
|
||||
if (!protocol2Active) {
|
||||
for (int i = 0; i < io.receivers; i++)
|
||||
invokeDataIOInitFrame(m_dataIO, i);
|
||||
}
|
||||
|
||||
if (m_serverMode == QSDR::SDRMode)
|
||||
invokeDataIOStartStop(m_dataIO, 0x01); // 0x01 for starting Metis without wide band data
|
||||
|
||||
@@ -1027,7 +1050,7 @@ bool DataEngine::start() {
|
||||
}
|
||||
|
||||
// data IO thread
|
||||
if (!startDataIO(QThread::NormalPriority)) {// ::NormalPriority::HighPriority)) {
|
||||
if (!startDataIO(QThread::HighestPriority)) {// ::NormalPriority::HighPriority)) {
|
||||
|
||||
DATA_ENGINE_DEBUG << "data IO thread could not be started.";
|
||||
return false;
|
||||
@@ -1046,8 +1069,11 @@ bool DataEngine::start() {
|
||||
SleeperThread::msleep(100);
|
||||
|
||||
// pre-conditioning
|
||||
for (int i = 0; i < io.receivers; i++)
|
||||
invokeDataIOInitFrame(m_dataIO, i);
|
||||
const bool protocol2Active = (set->getCurrentMetisCard().protocolVersion >= 2);
|
||||
if (!protocol2Active) {
|
||||
for (int i = 0; i < io.receivers; i++)
|
||||
invokeDataIOInitFrame(m_dataIO, i);
|
||||
}
|
||||
|
||||
if (m_serverMode == QSDR::SDRMode && set->getWidebandData())
|
||||
invokeDataIOStartStop(m_dataIO, 0x03); // 0x03 for starting the device with wide band data
|
||||
@@ -2265,6 +2291,18 @@ void DataEngine::setSampleRate(QObject *sender, int value) {
|
||||
io.outputMultiplier = 8;
|
||||
break;
|
||||
|
||||
case 768000:
|
||||
io.samplerate = value;
|
||||
io.speed = 3;
|
||||
io.outputMultiplier = 16;
|
||||
break;
|
||||
|
||||
case 1536000:
|
||||
io.samplerate = value;
|
||||
io.speed = 3;
|
||||
io.outputMultiplier = 32;
|
||||
break;
|
||||
|
||||
default:
|
||||
DATA_ENGINE_DEBUG << "invalid sample rate !\n";
|
||||
stop();
|
||||
@@ -3668,6 +3706,9 @@ void DataProcessor::encodeCCBytes() {
|
||||
|
||||
void DataProcessor::writeData() {
|
||||
|
||||
if (set->getCurrentMetisCard().protocolVersion >= 2)
|
||||
return;
|
||||
|
||||
if (m_setNetworkDeviceHeader) {
|
||||
|
||||
//RRK updated for 4byte int and network order
|
||||
@@ -3864,8 +3905,8 @@ void WideBandDataProcessor::processWideBandInputBuffer(const QByteArray &buffer)
|
||||
|
||||
for (int i = 0; i < length; i += 2) {
|
||||
|
||||
s = (int)((qint8 ) buffer.at(i+1)) << 8;
|
||||
s += (int)((quint8) buffer.at(i));
|
||||
s = (int)((qint8 ) buffer.at(i)) << 8;
|
||||
s += (int)((quint8) buffer.at(i+1));
|
||||
sample = (float)(s * norm);
|
||||
|
||||
cpxWBIn[i/2].re = sample * io->wbWindow.at(i/2);
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#define LOG_DATAIO
|
||||
|
||||
#include "cusdr_dataIO.h"
|
||||
#include "cusdr_protocol2_io.h"
|
||||
#include "soundout.h"
|
||||
@@ -155,7 +153,21 @@ void DataIO::initDataReceiverSocket() {
|
||||
}
|
||||
else {
|
||||
|
||||
if (io->samplerate == 384000) {
|
||||
if (io->samplerate == 1536000) {
|
||||
|
||||
newBufferSize = 512*1024;//512 * 1032;
|
||||
io->networkIOMutex.lock();
|
||||
DATAIO_DEBUG << "socket buffer size set to 512 kB.";
|
||||
io->networkIOMutex.unlock();
|
||||
}
|
||||
else if (io->samplerate == 768000) {
|
||||
|
||||
newBufferSize = 256*1024;//256 * 1032;
|
||||
io->networkIOMutex.lock();
|
||||
DATAIO_DEBUG << "socket buffer size set to 256 kB.";
|
||||
io->networkIOMutex.unlock();
|
||||
}
|
||||
else if (io->samplerate == 384000) {
|
||||
|
||||
newBufferSize = 128*1024;//128 * 1032;
|
||||
io->networkIOMutex.lock();
|
||||
@@ -185,9 +197,27 @@ void DataIO::initDataReceiverSocket() {
|
||||
}
|
||||
}
|
||||
|
||||
if (m_dataIOSocket->bind(QHostAddress(set->getHPSDRDeviceLocalAddr()),
|
||||
set->getMetisPort(),
|
||||
QUdpSocket::DontShareAddress))
|
||||
const QHostAddress localAddress(set->getHPSDRDeviceLocalAddr());
|
||||
const quint16 requestedPort = set->getMetisPort();
|
||||
bool socketBound = m_dataIOSocket->bind(localAddress,
|
||||
requestedPort,
|
||||
QUdpSocket::DontShareAddress);
|
||||
|
||||
if (!socketBound && requestedPort != 0) {
|
||||
io->networkIOMutex.lock();
|
||||
DATAIO_DEBUG << "data receiver socket binding failed on port " << requestedPort
|
||||
<< ", trying an ephemeral local port.";
|
||||
io->networkIOMutex.unlock();
|
||||
|
||||
m_dataIOSocket->close();
|
||||
socketBound = m_dataIOSocket->bind(localAddress,
|
||||
0,
|
||||
QUdpSocket::DontShareAddress);
|
||||
if (socketBound)
|
||||
set->setMetisPort(this, m_dataIOSocket->localPort());
|
||||
}
|
||||
|
||||
if (socketBound)
|
||||
//QUdpSocket::ReuseAddressHint | QUdpSocket::ShareAddress))
|
||||
{
|
||||
|
||||
@@ -684,6 +714,16 @@ void DataIO::setSampleRate(QObject *sender, int value) {
|
||||
DATAIO_DEBUG << "socket buffer size set to 128 kB.";
|
||||
break;
|
||||
|
||||
case 768000:
|
||||
bufferSize = 256*1024;//256 * 1032
|
||||
DATAIO_DEBUG << "socket buffer size set to 256 kB.";
|
||||
break;
|
||||
|
||||
case 1536000:
|
||||
bufferSize = 512*1024;//512 * 1032
|
||||
DATAIO_DEBUG << "socket buffer size set to 512 kB.";
|
||||
break;
|
||||
|
||||
default:
|
||||
DATAIO_DEBUG << "invalid sample rate !\n";
|
||||
break;
|
||||
|
||||
@@ -231,8 +231,21 @@ int DiscovererP1::findHPSDRDevices() {
|
||||
mcP1.adcCount = 0;
|
||||
mcP1.ddcCount = 0;
|
||||
mcP1.dspClockHz = 0;
|
||||
mcP1.individualDdcSampleRates = false;
|
||||
mcP1.minDdcSampleRateKsps = 48;
|
||||
mcP1.maxDdcSampleRateKsps = 384;
|
||||
mcP1.widebandData = false;
|
||||
mcP1.widebandSamplesPerPacket = 0;
|
||||
mcP1.widebandBitsPerSample = 0;
|
||||
mcP1.ducCount = 1;
|
||||
mcP1.ducSampleRateKsps = 48;
|
||||
mcP1.ducBitsPerSample = 24;
|
||||
mcP1.ducSamplesPerPacket = 0;
|
||||
mcP1.iqFormatFlags = 0;
|
||||
mcP1.phaseWords = false;
|
||||
mcP1.ducPhaseWords = false;
|
||||
mcP1.ddcAttenuator = false;
|
||||
mcP1.ducRxAttenuator = false;
|
||||
mcP1.hasAlex0 = false;
|
||||
mcP1.hasAlex1 = false;
|
||||
io->networkIOMutex.lock();
|
||||
|
||||
@@ -193,7 +193,7 @@ int DiscovererP2::findHPSDRDevices() {
|
||||
m_deviceDatagram[3] == (char)0) {
|
||||
status = m_deviceDatagram[4] & 0xFF;
|
||||
|
||||
if (status == 2 || status == 3) {
|
||||
if (status == 2 || status == 3 || status == 0xFE || status == 0xFF) {
|
||||
|
||||
sprintf(mcP2.mac_address, "%02X:%02X:%02X:%02X:%02X:%02X",
|
||||
m_deviceDatagram[5] & 0xFF, m_deviceDatagram[6] & 0xFF, m_deviceDatagram[7] & 0xFF,
|
||||
@@ -215,8 +215,21 @@ int DiscovererP2::findHPSDRDevices() {
|
||||
mcP2.adcCount = profile.adcCount;
|
||||
mcP2.ddcCount = profile.defaultDdcCount;
|
||||
mcP2.dspClockHz = profile.dspClockHz;
|
||||
mcP2.individualDdcSampleRates = profile.individualDdcSampleRates;
|
||||
mcP2.minDdcSampleRateKsps = profile.minDdcSampleRateKsps;
|
||||
mcP2.maxDdcSampleRateKsps = profile.maxDdcSampleRateKsps;
|
||||
mcP2.widebandData = profile.widebandData;
|
||||
mcP2.widebandSamplesPerPacket = profile.widebandSamplesPerPacket;
|
||||
mcP2.widebandBitsPerSample = profile.widebandBitsPerSample;
|
||||
mcP2.ducCount = profile.ducCount;
|
||||
mcP2.ducSampleRateKsps = profile.ducSampleRateKsps;
|
||||
mcP2.ducBitsPerSample = profile.ducBitsPerSample;
|
||||
mcP2.ducSamplesPerPacket = profile.ducSamplesPerPacket;
|
||||
mcP2.iqFormatFlags = 0;
|
||||
mcP2.phaseWords = profile.phaseWords;
|
||||
mcP2.ducPhaseWords = profile.ducPhaseWords;
|
||||
mcP2.ddcAttenuator = profile.ddcAttenuator;
|
||||
mcP2.ducRxAttenuator = profile.ducRxAttenuator;
|
||||
mcP2.hasAlex0 = profile.hasAlex0;
|
||||
mcP2.hasAlex1 = profile.hasAlex1;
|
||||
|
||||
@@ -226,13 +239,43 @@ int DiscovererP2::findHPSDRDevices() {
|
||||
mcP2.iqFormatFlags = m_deviceDatagram[22] & 0xFF;
|
||||
}
|
||||
|
||||
if (m_deviceDatagram.size() >= 97 && (m_deviceDatagram[4] & 0xFF) >= 0xFE) {
|
||||
mcP2.ddcCount = m_deviceDatagram[39] & 0xFF;
|
||||
mcP2.phaseWords = (m_deviceDatagram[40] & 0x01) != 0;
|
||||
mcP2.ddcAttenuator = (m_deviceDatagram[41] & 0x01) != 0;
|
||||
mcP2.widebandData = (m_deviceDatagram[42] & 0x01) != 0;
|
||||
mcP2.widebandSamplesPerPacket =
|
||||
((m_deviceDatagram[43] & 0xFF) << 8) | (m_deviceDatagram[44] & 0xFF);
|
||||
mcP2.widebandBitsPerSample = m_deviceDatagram[46] & 0xFF;
|
||||
mcP2.individualDdcSampleRates = (m_deviceDatagram[51] & 0x01) != 0;
|
||||
mcP2.minDdcSampleRateKsps =
|
||||
((m_deviceDatagram[52] & 0xFF) << 8) | (m_deviceDatagram[53] & 0xFF);
|
||||
mcP2.maxDdcSampleRateKsps =
|
||||
((m_deviceDatagram[54] & 0xFF) << 8) | (m_deviceDatagram[55] & 0xFF);
|
||||
mcP2.ducCount = m_deviceDatagram[70] & 0xFF;
|
||||
mcP2.ducPhaseWords = (m_deviceDatagram[78] & 0x01) != 0;
|
||||
mcP2.ducSampleRateKsps = m_deviceDatagram[79] & 0xFF;
|
||||
mcP2.ducBitsPerSample = m_deviceDatagram[80] & 0xFF;
|
||||
mcP2.ducSamplesPerPacket =
|
||||
((m_deviceDatagram[81] & 0xFF) << 8) | (m_deviceDatagram[82] & 0xFF);
|
||||
mcP2.ducRxAttenuator = (m_deviceDatagram[92] & 0x01) != 0;
|
||||
}
|
||||
|
||||
io->networkIOMutex.lock();
|
||||
DISCOVERER_DEBUG << "Protocol 2 device board ID: " << device;
|
||||
DISCOVERER_DEBUG << "Protocol 2 device is: " << qPrintable(str);
|
||||
DISCOVERER_DEBUG << "Protocol 2 capabilities: "
|
||||
<< mcP2.adcCount << " ADC, "
|
||||
<< mcP2.ddcCount << " DDC, phaseWords="
|
||||
<< mcP2.phaseWords << ", iqFlags=0x"
|
||||
<< mcP2.ddcCount << " DDC, DDC rate "
|
||||
<< mcP2.minDdcSampleRateKsps << "-"
|
||||
<< mcP2.maxDdcSampleRateKsps
|
||||
<< " ksps, phaseWords="
|
||||
<< mcP2.phaseWords
|
||||
<< ", DUC " << mcP2.ducSampleRateKsps
|
||||
<< " ksps/" << mcP2.ducBitsPerSample
|
||||
<< " bit, wideband="
|
||||
<< mcP2.widebandData
|
||||
<< ", iqFlags=0x"
|
||||
<< QString::number(mcP2.iqFormatFlags, 16);
|
||||
io->networkIOMutex.unlock();
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -10,7 +10,9 @@
|
||||
|
||||
#include <QHash>
|
||||
#include <QList>
|
||||
#include <QMutex>
|
||||
#include <QSet>
|
||||
#include <QThread>
|
||||
#include <QTimer>
|
||||
#include <QUdpSocket>
|
||||
|
||||
@@ -19,6 +21,8 @@ struct Protocol2IQSample {
|
||||
qint32 q;
|
||||
};
|
||||
|
||||
class Protocol2ReceiveThread;
|
||||
|
||||
class Protocol2DataPath : public QObject {
|
||||
|
||||
Q_OBJECT
|
||||
@@ -53,12 +57,18 @@ private slots:
|
||||
void handleWidebandDataChanged(QObject *sender, bool value);
|
||||
|
||||
private:
|
||||
friend class Protocol2ReceiveThread;
|
||||
|
||||
QList<int> activeDdcIndexes() const;
|
||||
void closeSockets();
|
||||
void processReceivedDatagram(const QByteArray &datagram, quint16 senderPort);
|
||||
void processIgnoredDatagram(const char *data, int length, quint16 senderPort);
|
||||
bool sendNativeDatagram(const QByteArray &datagram, const QHostAddress &address, quint16 port);
|
||||
void sendGeneralPacket();
|
||||
void sendDdcSpecificPacket();
|
||||
void sendDucSpecificPacket();
|
||||
void sendHighPriorityPacket(bool run);
|
||||
void softRestartDdcStream();
|
||||
void refreshDdcConfiguration(bool rebuildSockets);
|
||||
void refreshHighPriorityState();
|
||||
void refreshWidebandConfiguration();
|
||||
@@ -74,10 +84,15 @@ private:
|
||||
Settings* set;
|
||||
THPSDRParameter* io;
|
||||
QUdpSocket* m_commandSocket;
|
||||
Protocol2ReceiveThread* m_receiveThread;
|
||||
int m_commandSocketFd;
|
||||
quint16 m_commandPort;
|
||||
int m_commandReceiveBufferSize;
|
||||
QUdpSocket* m_statusSocket;
|
||||
QUdpSocket* m_widebandSocket;
|
||||
QList<QUdpSocket*> m_ddcSockets;
|
||||
QList<QList<Protocol2IQSample> > m_ddcSampleBuffers;
|
||||
QList<QByteArray> m_ddcSampleBuffers;
|
||||
QList<QByteArray> m_legacySampleBuffers;
|
||||
QTimer* m_heartbeatTimer;
|
||||
QByteArray m_partialLegacyFrame;
|
||||
QByteArray m_statusDatagram;
|
||||
@@ -95,17 +110,28 @@ private:
|
||||
int m_heartbeatTick;
|
||||
quint64 m_ddcDatagramsReceived;
|
||||
quint64 m_ddcSamplesReceived;
|
||||
quint32 m_lastDdcSequence;
|
||||
quint64 m_ddcSequenceGaps;
|
||||
quint64 m_ddcRecoveryAttempts;
|
||||
quint64 m_legacyFramesEnqueued;
|
||||
quint64 m_legacyFramesQueued;
|
||||
quint64 m_legacyFramesDropped;
|
||||
quint64 m_statusPacketsReceived;
|
||||
quint64 m_highPriorityPacketsSent;
|
||||
quint64 m_micPacketsIgnored;
|
||||
quint64 m_widebandPacketsIgnored;
|
||||
quint64 m_widebandPacketsLogged;
|
||||
bool m_dropWidebandReceivePackets;
|
||||
QHash<quint16, quint64> m_commandPortCounters;
|
||||
QSet<quint16> m_loggedFirstSourcePorts;
|
||||
QMutex m_receiveMutex;
|
||||
bool m_logConfigPackets;
|
||||
uchar m_lastStatusByte4;
|
||||
uchar m_lastStatusByte5;
|
||||
bool m_loggedFirstDdcDatagram;
|
||||
quint64 m_prevDdcDatagramsReceived; // to detect stream stop
|
||||
int m_lastDdcGrowthTick;
|
||||
int m_lastDdcRecoveryTick;
|
||||
};
|
||||
|
||||
#endif // _CUSDR_PROTOCOL2_IO_H
|
||||
|
||||
@@ -15,7 +15,20 @@ static Protocol2BoardProfile makeDefaultProfile(int boardId) {
|
||||
profile.adcCount = 1;
|
||||
profile.defaultDdcCount = 2;
|
||||
profile.dspClockHz = 122880000;
|
||||
profile.individualDdcSampleRates = true;
|
||||
profile.minDdcSampleRateKsps = 48;
|
||||
profile.maxDdcSampleRateKsps = 1536;
|
||||
profile.widebandData = true;
|
||||
profile.widebandSamplesPerPacket = 512;
|
||||
profile.widebandBitsPerSample = 16;
|
||||
profile.ducCount = 1;
|
||||
profile.ducSampleRateKsps = 192;
|
||||
profile.ducBitsPerSample = 24;
|
||||
profile.ducSamplesPerPacket = 240;
|
||||
profile.phaseWords = true;
|
||||
profile.ducPhaseWords = true;
|
||||
profile.ddcAttenuator = true;
|
||||
profile.ducRxAttenuator = true;
|
||||
profile.hasAlex0 = true;
|
||||
profile.hasAlex1 = false;
|
||||
return profile;
|
||||
@@ -35,6 +48,7 @@ Protocol2BoardProfile protocol2BoardProfile(int boardId) {
|
||||
profile.defaultDdcCount = 4;
|
||||
profile.dspClockHz = 122880000;
|
||||
profile.phaseWords = false;
|
||||
profile.ducPhaseWords = false;
|
||||
profile.hasAlex0 = true;
|
||||
profile.hasAlex1 = false;
|
||||
break;
|
||||
@@ -62,9 +76,10 @@ Protocol2BoardProfile protocol2BoardProfile(int boardId) {
|
||||
case 3:
|
||||
profile.boardName = "Angelia / ANAN-100D";
|
||||
profile.adcCount = 2;
|
||||
profile.defaultDdcCount = 4;
|
||||
profile.defaultDdcCount = 7;
|
||||
profile.dspClockHz = 122880000;
|
||||
profile.phaseWords = true;
|
||||
profile.ducSamplesPerPacket = 238;
|
||||
profile.hasAlex0 = true;
|
||||
profile.hasAlex1 = false;
|
||||
break;
|
||||
@@ -75,6 +90,7 @@ Protocol2BoardProfile protocol2BoardProfile(int boardId) {
|
||||
profile.defaultDdcCount = 4;
|
||||
profile.dspClockHz = 122880000;
|
||||
profile.phaseWords = true;
|
||||
profile.ducSamplesPerPacket = 240;
|
||||
profile.hasAlex0 = true;
|
||||
profile.hasAlex1 = false;
|
||||
break;
|
||||
@@ -99,6 +115,16 @@ Protocol2BoardProfile protocol2BoardProfile(int boardId) {
|
||||
profile.hasAlex1 = false;
|
||||
break;
|
||||
|
||||
case 100:
|
||||
profile.boardName = "Hermes Lite 2 / C25";
|
||||
profile.adcCount = 1;
|
||||
profile.defaultDdcCount = 2;
|
||||
profile.dspClockHz = 76800000;
|
||||
profile.phaseWords = true;
|
||||
profile.hasAlex0 = false;
|
||||
profile.hasAlex1 = false;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
profile.boardName = "Saturn / ANAN-G2";
|
||||
profile.adcCount = 2;
|
||||
@@ -129,6 +155,9 @@ QString protocol2DeviceSummary(const TNetworkDevicecard &device) {
|
||||
if (device.adcCount > 0 || device.ddcCount > 0)
|
||||
summary += QString(" %1ADC/%2DDC").arg(device.adcCount).arg(device.ddcCount);
|
||||
|
||||
if (device.maxDdcSampleRateKsps > 0)
|
||||
summary += QString(" %1ksps").arg(device.maxDdcSampleRateKsps);
|
||||
|
||||
if (device.phaseWords)
|
||||
summary += " phase";
|
||||
|
||||
|
||||
@@ -15,7 +15,20 @@ struct Protocol2BoardProfile {
|
||||
int adcCount;
|
||||
int defaultDdcCount;
|
||||
int dspClockHz;
|
||||
bool individualDdcSampleRates;
|
||||
int minDdcSampleRateKsps;
|
||||
int maxDdcSampleRateKsps;
|
||||
bool widebandData;
|
||||
int widebandSamplesPerPacket;
|
||||
int widebandBitsPerSample;
|
||||
int ducCount;
|
||||
int ducSampleRateKsps;
|
||||
int ducBitsPerSample;
|
||||
int ducSamplesPerPacket;
|
||||
bool phaseWords;
|
||||
bool ducPhaseWords;
|
||||
bool ddcAttenuator;
|
||||
bool ducRxAttenuator;
|
||||
bool hasAlex0;
|
||||
bool hasAlex1;
|
||||
};
|
||||
|
||||
@@ -369,14 +369,22 @@ void Receiver::setSampleRate(QObject *sender, int value) {
|
||||
m_samplerate = value;
|
||||
break;
|
||||
|
||||
case 384000:
|
||||
m_samplerate = value;
|
||||
break;
|
||||
|
||||
default:
|
||||
RECEIVER_DEBUG << "invalid sample rate (possible values are: 48, 96, 192, or 384 kHz)!\n";
|
||||
break;
|
||||
}
|
||||
case 384000:
|
||||
m_samplerate = value;
|
||||
break;
|
||||
|
||||
case 768000:
|
||||
m_samplerate = value;
|
||||
break;
|
||||
|
||||
case 1536000:
|
||||
m_samplerate = value;
|
||||
break;
|
||||
|
||||
default:
|
||||
RECEIVER_DEBUG << "invalid sample rate (possible values are: 48, 96, 192, 384, 768, or 1536 kHz)!\n";
|
||||
break;
|
||||
}
|
||||
|
||||
if (qtdsp)
|
||||
qtdsp->setSampleRate(this, m_samplerate);
|
||||
|
||||
Reference in New Issue
Block a user