Another try at getting "Save Decoded" right for all modes.

This commit is contained in:
Joe Taylor 2021-03-10 16:09:53 -05:00 committed by Bill Somerville
parent b5d4440a8f
commit b869f831b3
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F

View File

@ -3307,12 +3307,18 @@ void MainWindow::decodeDone ()
double tdone = fmod(double(tnow.time().second()),m_TRperiod); double tdone = fmod(double(tnow.time().second()),m_TRperiod);
int mswait; int mswait;
if( tdone < 0.5*m_TRperiod ) { if( tdone < 0.5*m_TRperiod ) {
mswait = 1000.0 * ( 0.75 * m_TRperiod - tdone ); mswait = 1000.0 * ( 0.6 * m_TRperiod - tdone );
} else { } else {
mswait = 1000.0 * ( 1.75 * m_TRperiod - tdone ); mswait = 1000.0 * ( 1.6 * m_TRperiod - tdone );
} }
m_bDecoded=m_nDecodes>0;
// qDebug() << "aa 3316" << m_saveDecoded << m_saveAll << m_bDecoded << m_nDecodes
// << m_TRperiod << tdone << mswait;
if(!m_diskData and !m_saveAll) { if(!m_diskData and !m_saveAll) {
if(m_saveDecoded and (m_nDecodes==0)) killFileTimer.start(mswait); //Kill at 3/4 period if(m_saveDecoded and (m_nDecodes==0)) {
// qDebug() << "bb 3319" << mswait;
killFileTimer.start(mswait); //Kill at 3/4 period
}
} }
if(m_mode!="FT8" or dec_data.params.nzhsym==50) m_nDecodes=0; if(m_mode!="FT8" or dec_data.params.nzhsym==50) m_nDecodes=0;
@ -3710,6 +3716,7 @@ void MainWindow::pskPost (DecodedText const& decodedtext)
void MainWindow::killFile () void MainWindow::killFile ()
{ {
// qDebug() << "cc 3725" << m_saveDecoded << m_saveAll << m_bDecoded << m_nDecodes << m_fnameWE;
if (m_fnameWE.size () && !(m_saveAll || (m_saveDecoded && m_bDecoded))) { if (m_fnameWE.size () && !(m_saveAll || (m_saveDecoded && m_bDecoded))) {
QFile f1 {m_fnameWE + ".wav"}; QFile f1 {m_fnameWE + ".wav"};
if(f1.exists()) f1.remove(); if(f1.exists()) f1.remove();