Fix a regression in WSPR saved file names from r6806

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6807 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2016-06-24 17:31:25 +00:00
parent c69bfee149
commit db820683ff

View File

@ -1080,7 +1080,7 @@ void MainWindow::dataSink(qint64 frames)
if(!m_mode.startsWith ("WSPR")) decode(); //Start decoder if(!m_mode.startsWith ("WSPR")) decode(); //Start decoder
if(!m_diskData) { //Always save; may delete later if(!m_diskData) { //Always save; may delete later
auto const& period_start = now.addSecs (-now.time ().minute () % (m_TRperiod / 60)); auto const& period_start = now.addSecs (-(now.time ().minute () % (m_TRperiod / 60)) * 60);
m_fnameWE = m_config.save_directory ().absoluteFilePath (period_start.toString ("yyMMdd_hhmm")); m_fnameWE = m_config.save_directory ().absoluteFilePath (period_start.toString ("yyMMdd_hhmm"));
m_fileToSave.clear (); m_fileToSave.clear ();
// the following is potential a threading hazard - not a good // the following is potential a threading hazard - not a good
@ -1222,7 +1222,7 @@ void MainWindow::fastSink(qint64 frames)
m_bFastDecodeCalled=true; m_bFastDecodeCalled=true;
decode(); decode();
} }
if(!m_diskData) { if(!m_diskData) { // Always save; may delete later
QDateTime now {QDateTime::currentDateTimeUtc()}; QDateTime now {QDateTime::currentDateTimeUtc()};
auto const& period_start = now.addSecs (-now.time ().second () % m_TRperiod); auto const& period_start = now.addSecs (-now.time ().second () % m_TRperiod);
m_fnameWE = m_config.save_directory ().absoluteFilePath (period_start.toString ("yyMMdd_hhmmss")); m_fnameWE = m_config.save_directory ().absoluteFilePath (period_start.toString ("yyMMdd_hhmmss"));