mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-01 08:07:10 -04:00
Manage .c2 files in the same way as .wav files.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5673 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
97509cbea0
commit
877f75add1
@ -824,14 +824,12 @@ void MainWindow::dataSink(qint64 frames)
|
|||||||
QString t2;
|
QString t2;
|
||||||
t2.sprintf("%2.2d%2.2d",ihr,imin);
|
t2.sprintf("%2.2d%2.2d",ihr,imin);
|
||||||
m_fileToSave.clear ();
|
m_fileToSave.clear ();
|
||||||
m_fname=m_config.save_directory ().absoluteFilePath (t.date().toString("yyMMdd") +
|
m_fname = m_config.save_directory ().absoluteFilePath (t.date().toString("yyMMdd") + "_" + t2);
|
||||||
"_" + t2 + ".wav");
|
*future2 = QtConcurrent::run(savewav, m_fname + ".wav", m_TRperiod);
|
||||||
*future2 = QtConcurrent::run(savewav, m_fname, m_TRperiod);
|
|
||||||
watcher2->setFuture(*future2);
|
watcher2->setFuture(*future2);
|
||||||
|
|
||||||
if( m_mode.mid(0,4)=="WSPR" && (m_saveAll || (m_saveDecoded && m_bdecoded)) ) {
|
if (m_mode.mid (0,4) == "WSPR") {
|
||||||
m_c2name=m_config.save_directory ().absoluteFilePath (t.date().toString("yyMMdd") +
|
m_c2name = m_fname + ".c2";
|
||||||
"_" + t2 + ".c2");
|
|
||||||
int len1=m_c2name.length();
|
int len1=m_c2name.length();
|
||||||
char c2name[80];
|
char c2name[80];
|
||||||
strcpy(c2name,m_c2name.toLatin1());
|
strcpy(c2name,m_c2name.toLatin1());
|
||||||
@ -856,7 +854,7 @@ void MainWindow::dataSink(qint64 frames)
|
|||||||
} else {
|
} else {
|
||||||
cmnd='"' + m_appDir + '"' + "/wsprd -a \"" +
|
cmnd='"' + m_appDir + '"' + "/wsprd -a \"" +
|
||||||
QDir::toNativeSeparators(m_dataDir.absolutePath()) + "\" " +
|
QDir::toNativeSeparators(m_dataDir.absolutePath()) + "\" " +
|
||||||
t2 + '"' + m_fname + '"';
|
t2 + '"' + m_fname + ".wav\"";
|
||||||
}
|
}
|
||||||
QString t3=cmnd;
|
QString t3=cmnd;
|
||||||
int i1=cmnd.indexOf("/wsprd ");
|
int i1=cmnd.indexOf("/wsprd ");
|
||||||
@ -1696,7 +1694,8 @@ void MainWindow::killFile ()
|
|||||||
{
|
{
|
||||||
if (!m_fname.isEmpty ()
|
if (!m_fname.isEmpty ()
|
||||||
&& !(m_saveAll || (m_saveDecoded && m_bdecoded) || m_fname == m_fileToSave)) {
|
&& !(m_saveAll || (m_saveDecoded && m_bdecoded) || m_fname == m_fileToSave)) {
|
||||||
QFile {m_fname}.remove();
|
QFile {m_fname + ".wav"}.remove();
|
||||||
|
QFile {m_fname + ".c2"}.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4004,6 +4003,7 @@ void MainWindow::p1ReadFromStdout() //p1readFromStdout
|
|||||||
while(p1.canReadLine()) {
|
while(p1.canReadLine()) {
|
||||||
QString t(p1.readLine());
|
QString t(p1.readLine());
|
||||||
if(t.indexOf("<DecodeFinished>") >= 0) {
|
if(t.indexOf("<DecodeFinished>") >= 0) {
|
||||||
|
m_bdecoded = m_nWSPRdecodes > 0;
|
||||||
if(!m_diskData) {
|
if(!m_diskData) {
|
||||||
WSPR_history(m_dialFreqRxWSPR, m_nWSPRdecodes);
|
WSPR_history(m_dialFreqRxWSPR, m_nWSPRdecodes);
|
||||||
if(m_nWSPRdecodes==0) {
|
if(m_nWSPRdecodes==0) {
|
||||||
@ -4012,6 +4012,7 @@ void MainWindow::p1ReadFromStdout() //p1readFromStdout
|
|||||||
t=WSPR_hhmm(-60) + ' ' + t.rightJustified (66, '-');
|
t=WSPR_hhmm(-60) + ' ' + t.rightJustified (66, '-');
|
||||||
ui->decodedTextBrowser->appendText(t);
|
ui->decodedTextBrowser->appendText(t);
|
||||||
}
|
}
|
||||||
|
killFileTimer->start (45*1000); //Kill in 45s
|
||||||
}
|
}
|
||||||
m_nWSPRdecodes=0;
|
m_nWSPRdecodes=0;
|
||||||
ui->DecodeButton->setChecked (false);
|
ui->DecodeButton->setChecked (false);
|
||||||
@ -4023,18 +4024,6 @@ void MainWindow::p1ReadFromStdout() //p1readFromStdout
|
|||||||
QFile f(QDir::toNativeSeparators(m_dataDir.absolutePath()) + "/wspr_spots.txt");
|
QFile f(QDir::toNativeSeparators(m_dataDir.absolutePath()) + "/wspr_spots.txt");
|
||||||
if(f.exists()) f.remove();
|
if(f.exists()) f.remove();
|
||||||
}
|
}
|
||||||
if(!m_saveAll and !m_diskData) {
|
|
||||||
QFile savedWav(m_fname);
|
|
||||||
savedWav.remove();
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
if(m_saveAll and !m_diskData) {
|
|
||||||
int i1=m_fname.indexOf(".wav");
|
|
||||||
QString sc2=m_fname.mid(0,i1) + ".c2";
|
|
||||||
QFile savedC2(sc2);
|
|
||||||
savedC2.remove();
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
m_RxLog=0;
|
m_RxLog=0;
|
||||||
m_startAnother=m_loopall;
|
m_startAnother=m_loopall;
|
||||||
m_blankLine=true;
|
m_blankLine=true;
|
||||||
|
Loading…
Reference in New Issue
Block a user