From 5bd29096e5ea04468bbb6534db7b7964c7a5d927 Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Thu, 5 May 2022 18:48:45 +0100 Subject: [PATCH] Found issue with splitwaterfall function --- rigcommander.cpp | 2 +- udphandler.cpp | 7 ++++++- udpserver.cpp | 9 +++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/rigcommander.cpp b/rigcommander.cpp index a053810..d4768f8 100644 --- a/rigcommander.cpp +++ b/rigcommander.cpp @@ -108,7 +108,7 @@ void rigCommander::commSetup(unsigned char rigCivAddr, udpPreferences prefs, aud // civAddr = 0x94; // address of the radio. Decimal is 148. civAddr = rigCivAddr; // address of the radio. Decimal is 148. usingNativeLAN = true; - // --- + // -- setup(); // --- diff --git a/udphandler.cpp b/udphandler.cpp index 3280530..0a615d7 100644 --- a/udphandler.cpp +++ b/udphandler.cpp @@ -22,6 +22,10 @@ udpHandler::udpHandler(udpPreferences prefs, audioSetup rx, audioSetup tx) : { splitWf = true; } + else + { + splitWf = false; + } qInfo(logUdp()) << "Starting udpHandler user:" << username << " rx latency:" << rxSetup.latency << " tx latency:" << txSetup.latency << " rx sample rate: " << rxSetup.format.sampleRate() << " rx codec: " << rxSetup.codec << " tx sample rate: " << txSetup.format.sampleRate() << " tx codec: " << txSetup.codec; @@ -287,7 +291,7 @@ void udpHandler::dataReceived() audioPort = qFromBigEndian(in->audioport); if (!streamOpened) { - civ = new udpCivData(localIP, radioIP, civPort, civLocalPort,splitWf); + civ = new udpCivData(localIP, radioIP, civPort, splitWf, civLocalPort); // TX is not supported if (txSampleRates < 2) { @@ -800,6 +804,7 @@ void udpCivData::dataReceived() // Find data length int pos = r.indexOf(QByteArrayLiteral("\x27\x00\x00"))+2; int len = r.mid(pos).indexOf(QByteArrayLiteral("\xfd")); + //splitWaterfall = false; if (splitWaterfall && pos > 1 && len > 100) { // We need to split waterfall data into its component parts // There are only 2 types that we are currently aware of diff --git a/udpserver.cpp b/udpserver.cpp index 76b6be3..b0e2078 100644 --- a/udpserver.cpp +++ b/udpserver.cpp @@ -1494,9 +1494,10 @@ void udpServer::watchdog() qInfo(logUdpServer()) << "Current client is NULL!"; } } - - status.message = QString("
Server connections: Control:%1 CI-V:%2 Audio:%3
").arg(controlClients.size()).arg(civClients.size()).arg(audioClients.size()); - emit haveNetworkStatus(status); + if (!config->lan) { + status.message = QString("
Server connections: Control:%1 CI-V:%2 Audio:%3
").arg(controlClients.size()).arg(civClients.size()).arg(audioClients.size()); + emit haveNetworkStatus(status); + } } void udpServer::sendStatus(CLIENT* c) @@ -1583,7 +1584,7 @@ void udpServer::dataForServer(QByteArray d) } int lastFE = d.lastIndexOf((quint8)0xfe); - //qInfo(logUdpServer()) << "Server got CIV data from" << radio->rigName << "length" << d.length(); + //qInfo(logUdpServer()) << "Server got CIV data from" << config->rigs.first()->rigName << "length" << d.length() << d.toHex(); if (client->connected && d.length() > lastFE + 2 && ((quint8)d[lastFE + 1] == client->civId || (quint8)d[lastFE + 2] == client->civId || (quint8)d[lastFE + 1] == 0x00 || (quint8)d[lastFE + 2] == 0x00 || (quint8)d[lastFE + 1] == 0xE1 || (quint8)d[lastFE + 2] == 0xE1))