From a7ded943136cfb41c9f38dabc054e458a12e1daa Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 29 Jan 2019 15:24:08 -0500 Subject: [PATCH] Saved FT4 files must be at least 5 s long; Shift+F6 now works for FT4 files. --- widgets/mainwindow.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 4b07b2017..b6004ca9c 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -8687,6 +8687,11 @@ void MainWindow::ft4Data(int k) //### } nhsec0=nhsec; + if(m_diskData and (k > (dec_data.params.kin-6000))) m_startAnother=m_loopall; + if(m_bNoMoreFiles) { + MessageBox::information_message(this, tr("Just one more file to open.")); + m_bNoMoreFiles=false; + } } void MainWindow::ft4_tx(int ntx) @@ -8764,14 +8769,14 @@ void MainWindow::FT4_writeTx() void MainWindow::save_FT4() { + int nsec=(dec_data.params.kin + 3456)/12000; + if(nsec<5) return; //Saved data must be at least 5 seconds long. auto time = QDateTime::currentDateTimeUtc (); QString t=time.toString("yyMMdd_hhmmss"); m_fnameWE=m_config.save_directory().absoluteFilePath(t); - int nsec=(dec_data.params.kin + 3456)/12000; // The following is potential a threading hazard - not a good // idea to pass pointer to be processed in another thread m_saveWAVWatcher.setFuture (QtConcurrent::run (std::bind (&MainWindow::save_wave_file, this, m_fnameWE, &dec_data.d2[0], nsec, m_config.my_callsign(), m_config.my_grid(), m_mode, m_nSubMode, m_freqNominal, m_hisCall, m_hisGrid))); -// qDebug() << "aa" << m_fnameWE << nsec; }