Hi All,
waiting for 2.1 source code release (where I hope the problem is
corrected) found a simple patch for old "LONG" modes
// nice idea new all.txt
// aligned text with time and frequency every line
// but some problems with 1 minute modes (JT9 JT65 JT9+JT65) :
// - lost character from message
// - misalignement with m_mode lenght .GT. 6
// - m_fileDateTime can be 11 or 13 character
void MainWindow::write_all(QString txRx, QString message)
{
QString line;
QString t;
QString msg;
QString mode;
if (message[4]==' ') { //in JT9 and JT65 no seconds. hhmm vs hhmmss
msg=message.mid(4,-1);
} else {
msg=message.mid(6,-1);
}
// check simbol for mode - note that JT9+JT65 is longer than 6 char
// so in rx @/# are written as single mode, not composite mode
// confused as FT8 and FT4 have some simbol '~' (see image in pdf)
if (message[19]=='#') {
mode="JT65 ";
} else if (message[19]=='@') {
mode="JT9 ";
} else {
mode=m_mode.leftJustified(6,' ');
}
msg=msg.mid(0,15) + msg.mid(18,-1);
t.sprintf("%5d",ui->TxFreqSpinBox->value());
if(txRx=="Tx") msg=" 0 0.0" + t + " " + message;
auto time = QDateTime::currentDateTimeUtc ();
time = time.addSecs (-(time.time ().second () % m_TRperiod));
t.sprintf("%10.3f ",m_freqNominal/1.e6);
if(m_diskData) {
if (m_fileDateTime.size()==11) { //have no seconds
line=m_fileDateTime + " " + t + txRx + " " + mode + msg;
} else {
line=m_fileDateTime + t + txRx + " " + mode + msg;
}
} else {
line=time.toString("yyMMdd_hhmmss") + t + txRx + " " + mode + msg;
}
QString file_name="ALL.TXT";
if(m_mode=="WSPR") file_name="ALL_WSPR.TXT";
QFile f{m_config.writeable_data_dir().absoluteFilePath(file_name)};
if(f.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append)) {
QTextStream out(&f);
out << line << endl;
f.close();
} else {
auto const& message2 = tr ("Cannot open \"%1\" for append: %2")
.arg (f.fileName ()).arg (f.errorString ());
QTimer::singleShot (0, [=] { // don't block guiUpdate
MessageBox::warning_message(this, tr ("Log File Error"),
message2); });
}
}
Thank in advance
--
73
Sandro
IW3RAB
_______________________________________________
wsjt-devel mailing list
wsjt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wsjt-devel