mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-15 16:42:12 -05:00
Fix truncation of non-FT8 decoded messages in ALL.TXT
This commit is contained in:
parent
b8e4517718
commit
bf87499635
@ -2960,18 +2960,17 @@ void MainWindow::decodeDone ()
|
|||||||
void MainWindow::readFromStdout() //readFromStdout
|
void MainWindow::readFromStdout() //readFromStdout
|
||||||
{
|
{
|
||||||
while(proc_jt9.canReadLine()) {
|
while(proc_jt9.canReadLine()) {
|
||||||
QByteArray t=proc_jt9.readLine();
|
auto line_read = proc_jt9.readLine ();
|
||||||
if(m_mode!="FT8") {
|
if(m_mode!="FT8") {
|
||||||
//Pad 22-char msg to 37 chars
|
//Pad 22-char msg to at least 37 chars
|
||||||
t=t.left(43) + " " + t.mid(43,-1);
|
line_read = line_read.left(43) + " " + line_read.mid(43,-1);
|
||||||
t=t.trimmed();
|
|
||||||
}
|
}
|
||||||
// qint64 ms=QDateTime::currentMSecsSinceEpoch() - m_msec0;
|
// qint64 ms=QDateTime::currentMSecsSinceEpoch() - m_msec0;
|
||||||
bool bAvgMsg=false;
|
bool bAvgMsg=false;
|
||||||
int navg=0;
|
int navg=0;
|
||||||
if(t.indexOf("<DecodeFinished>") >= 0) {
|
if(line_read.indexOf("<DecodeFinished>") >= 0) {
|
||||||
if(m_mode=="QRA64") m_wideGraph->drawRed(0,0);
|
if(m_mode=="QRA64") m_wideGraph->drawRed(0,0);
|
||||||
m_bDecoded = t.mid(20).trimmed().toInt() > 0;
|
m_bDecoded = line_read.mid(20).trimmed().toInt() > 0;
|
||||||
int mswait=3*1000*m_TRperiod/4;
|
int mswait=3*1000*m_TRperiod/4;
|
||||||
if(!m_diskData) killFileTimer.start(mswait); //Kill in 3/4 period
|
if(!m_diskData) killFileTimer.start(mswait); //Kill in 3/4 period
|
||||||
decodeDone ();
|
decodeDone ();
|
||||||
@ -2983,16 +2982,16 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
if(m_mode=="JT4" or m_mode=="JT65" or m_mode=="QRA64" or m_mode=="FT8") {
|
if(m_mode=="JT4" or m_mode=="JT65" or m_mode=="QRA64" or m_mode=="FT8") {
|
||||||
int n=t.indexOf("f");
|
int n=line_read.indexOf("f");
|
||||||
if(n<0) n=t.indexOf("d");
|
if(n<0) n=line_read.indexOf("d");
|
||||||
if(n>0) {
|
if(n>0) {
|
||||||
QString tt=t.mid(n+1,1);
|
QString tt=line_read.mid(n+1,1);
|
||||||
navg=tt.toInt();
|
navg=tt.toInt();
|
||||||
if(navg==0) {
|
if(navg==0) {
|
||||||
char c = tt.data()->toLatin1();
|
char c = tt.data()->toLatin1();
|
||||||
if(int(c)>=65 and int(c)<=90) navg=int(c)-54;
|
if(int(c)>=65 and int(c)<=90) navg=int(c)-54;
|
||||||
}
|
}
|
||||||
if(navg>1 or t.indexOf("f*")>0) bAvgMsg=true;
|
if(navg>1 or line_read.indexOf("f*")>0) bAvgMsg=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3005,8 +3004,7 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
<< m_mode << endl;
|
<< m_mode << endl;
|
||||||
m_RxLog=0;
|
m_RxLog=0;
|
||||||
}
|
}
|
||||||
int n=t.length();
|
out << line_read.left (line_read.size() - 2).trimmed () << endl;
|
||||||
out << t.mid(0,n-2) << endl;
|
|
||||||
f.close();
|
f.close();
|
||||||
} else {
|
} else {
|
||||||
MessageBox::warning_message (this, tr ("File Open Error")
|
MessageBox::warning_message (this, tr ("File Open Error")
|
||||||
@ -3022,9 +3020,9 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
m_blankLine = false;
|
m_blankLine = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
DecodedText decodedtext0 {QString::fromUtf8(t.constData())
|
DecodedText decodedtext0 {QString::fromUtf8(line_read.constData())
|
||||||
.remove(QRegularExpression {"\r|\n"})};
|
.remove(QRegularExpression {"\r|\n"})};
|
||||||
DecodedText decodedtext {QString::fromUtf8(t.constData())
|
DecodedText decodedtext {QString::fromUtf8(line_read.constData())
|
||||||
.remove(QRegularExpression {"\r|\n"}).remove("TU; ")};
|
.remove(QRegularExpression {"\r|\n"}).remove("TU; ")};
|
||||||
|
|
||||||
if(m_mode=="FT8" and SpecOp::FOX == m_config.special_op_id() and
|
if(m_mode=="FT8" and SpecOp::FOX == m_config.special_op_id() and
|
||||||
|
Loading…
Reference in New Issue
Block a user