diff --git a/decodedtext.cpp b/decodedtext.cpp index bf63ab36f..5525fbab7 100644 --- a/decodedtext.cpp +++ b/decodedtext.cpp @@ -81,11 +81,11 @@ bool DecodedText::report(QString const& myBaseCall, QString const& dxBaseCall, / { QString msg=_string.mid(column_qsoText).trimmed(); if(msg.length() < 1) return false; - msg=(msg+" ").mid(0,22); - int i1=msg.indexOf("\r"); + msg = msg.remove (QRegularExpression {"[<>]"}); + int i1=msg.indexOf('\r'); if (i1>0) - msg=msg.mid(0,i1-1) + " "; - bool b = stdmsg_(msg.mid(0,22).toLatin1().constData(),22); // stdmsg is a fortran routine that packs the text, unpacks it and compares the result + msg=msg.left (i1-1); + bool b = stdmsg_ ((msg + " ").toLatin1().constData(),22); // stdmsg is a fortran routine that packs the text, unpacks it and compares the result QStringList w=msg.split(" ",QString::SkipEmptyParts); if(w.size () @@ -124,7 +124,7 @@ bool DecodedText::report(QString const& myBaseCall, QString const& dxBaseCall, / QString DecodedText::call() { auto call = _string; - call = call.replace (QRegularExpression {" CQ ([A-Z]{2,2}) "}, " CQ_\\1 ").mid (column_qsoText); + call = call.replace (QRegularExpression {" CQ ([A-Z]{2,2}|[0-9]{3,3}) "}, " CQ_\\1 ").mid (column_qsoText); int i = call.indexOf(" "); return call.mid(0,i); } @@ -133,9 +133,7 @@ QString DecodedText::call() void DecodedText::deCallAndGrid(/*out*/QString& call, QString& grid) { auto msg = _string; - int i0=msg.indexOf("CQ "); - if(i0>0 and mid(i0+3,3).toInt()>0) msg=msg.mid(0,i0+3) + msg.mid(i0+7,-1); - msg = msg.replace (QRegularExpression {" CQ ([A-Z]{2,2}) "}, " CQ_\\1 ").mid (column_qsoText); + msg = msg.replace (QRegularExpression {" CQ ([A-Z]{2,2}|[0-9]{3,3}) "}, " CQ_\\1 ").mid (column_qsoText); int i1 = msg.indexOf(" "); call = msg.mid(i1+1); int i2 = call.indexOf(" "); diff --git a/mainwindow.cpp b/mainwindow.cpp index 409512d71..6625f1e69 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -2527,7 +2527,7 @@ void MainWindow::pskPost(DecodedText decodedtext) Frequency frequency = m_freqNominal + audioFrequency; pskSetLocal (); if(grid_regexp.exactMatch (grid)) { -// qDebug() << "To PSKreporter:" << deCall << grid << frequency << msgmode << snr; + // qDebug() << "To PSKreporter:" << deCall << grid << frequency << msgmode << snr; psk_Reporter->addRemoteStation(deCall,grid,QString::number(frequency),msgmode, QString::number(snr),QString::number(QDateTime::currentDateTime().toTime_t())); } @@ -3247,7 +3247,7 @@ void MainWindow::processMessage(QString const& messages, int position, bool ctrl } auto t3 = decodedtext.string (); - auto t4 = t3.replace (QRegularExpression {" CQ ([A-Z]{2,2}) "}, " CQ_\\1 ").split (" ", QString::SkipEmptyParts); + auto t4 = t3.replace (QRegularExpression {" CQ ([A-Z]{2,2}|[0-9]{3,3}) "}, " CQ_\\1 ").split (" ", QString::SkipEmptyParts); if(t4.size () < 6) return; //Skip the rest if no decoded text int frequency = decodedtext.frequencyOffset(); diff --git a/psk_reporter.cpp b/psk_reporter.cpp index 82db043a6..38d10417a 100644 --- a/psk_reporter.cpp +++ b/psk_reporter.cpp @@ -111,7 +111,7 @@ void PSK_Reporter::sendReport() // Send data to PSK Reporter site if (!m_pskReporterAddress.isNull()) { - m_messageClient->send_raw_datagram (report, m_pskReporterAddress, 4739); + m_messageClient->send_raw_datagram (report, m_pskReporterAddress, 4739); } }