From b869f831b31b0314285e0ae5121025a882081c2e Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Wed, 10 Mar 2021 16:09:53 -0500 Subject: [PATCH] Another try at getting "Save Decoded" right for all modes. --- widgets/mainwindow.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 67f0dcecc..f04f212de 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3307,12 +3307,18 @@ void MainWindow::decodeDone () double tdone = fmod(double(tnow.time().second()),m_TRperiod); int mswait; if( tdone < 0.5*m_TRperiod ) { - mswait = 1000.0 * ( 0.75 * m_TRperiod - tdone ); + mswait = 1000.0 * ( 0.6 * m_TRperiod - tdone ); } 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_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; @@ -3710,6 +3716,7 @@ void MainWindow::pskPost (DecodedText const& decodedtext) 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))) { QFile f1 {m_fnameWE + ".wav"}; if(f1.exists()) f1.remove();