Found issue with splitwaterfall function

merge-requests/9/merge
Phil Taylor 2022-05-05 18:48:45 +01:00
rodzic 8b958d572c
commit 5bd29096e5
3 zmienionych plików z 12 dodań i 6 usunięć

Wyświetl plik

@ -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();
// ---

Wyświetl plik

@ -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

Wyświetl plik

@ -1494,9 +1494,10 @@ void udpServer::watchdog()
qInfo(logUdpServer()) << "Current client is NULL!";
}
}
status.message = QString("<pre>Server connections: Control:%1 CI-V:%2 Audio:%3</pre>").arg(controlClients.size()).arg(civClients.size()).arg(audioClients.size());
emit haveNetworkStatus(status);
if (!config->lan) {
status.message = QString("<pre>Server connections: Control:%1 CI-V:%2 Audio:%3</pre>").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))