diff --git a/CMakeLists.txt b/CMakeLists.txt index f24abbbeb..e7d65cf5b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -907,6 +907,7 @@ message (STATUS "hamlib_LIBRARY_DIRS: ${hamlib_LIBRARY_DIRS}") set (CMAKE_REQUIRED_INCLUDES "${hamlib_INCLUDE_DIRS}") set (CMAKE_REQUIRED_LIBRARIES "${hamlib_LIBRARIES}") +check_symbol_exists (CACHE_ALL "hamlib/rig.h" HAVE_HAMLIB_OLD_CACHING) check_symbol_exists (rig_set_cache_timeout_ms "hamlib/rig.h" HAVE_HAMLIB_CACHING) diff --git a/Darwin/sysctl.conf b/Darwin/sysctl.conf index 830bba803..4d6cf69e0 100644 --- a/Darwin/sysctl.conf +++ b/Darwin/sysctl.conf @@ -1,6 +1,5 @@ -kern.sysv.shmmax=14680064 +kern.sysv.shmmax=104857600 kern.sysv.shmmin=1 kern.sysv.shmmni=128 kern.sysv.shmseg=32 -kern.sysv.shmall=17920 - +kern.sysv.shmall=25600 diff --git a/Network/PSKReporter.cpp b/Network/PSKReporter.cpp index fcdebf2c5..8c8d7948d 100644 --- a/Network/PSKReporter.cpp +++ b/Network/PSKReporter.cpp @@ -145,8 +145,10 @@ public: #if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) connect (socket_.get (), &QAbstractSocket::errorOccurred, this, &PSKReporter::impl::handle_socket_error); -#else +#elif QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) connect (socket_.data (), QOverload::of (&QAbstractSocket::error), this, &PSKReporter::impl::handle_socket_error); +#else + connect (socket_.data (), static_cast (&QAbstractSocket::error), this, &PSKReporter::impl::handle_socket_error); #endif // use this for pseudo connection with UDP, allows us to use diff --git a/Transceiver/HamlibTransceiver.cpp b/Transceiver/HamlibTransceiver.cpp index 3923f4c5d..ce7408a04 100644 --- a/Transceiver/HamlibTransceiver.cpp +++ b/Transceiver/HamlibTransceiver.cpp @@ -14,6 +14,10 @@ #include "moc_HamlibTransceiver.cpp" +#if HAVE_HAMLIB_OLD_CACHING +#define HAMLIB_CACHE_ALL CACHE_ALL +#endif + namespace { // Unfortunately bandwidth is conflated with mode, this is probably @@ -606,7 +610,7 @@ int HamlibTransceiver::do_start () } } -#if HAVE_HAMLIB_CACHING +#if HAVE_HAMLIB_CACHING || HAVE_HAMLIB_OLD_CACHING // we must disable Hamlib caching because it lies about frequency // for less than 1 Hz resolution rigs auto orig_cache_timeout = rig_get_cache_timeout_ms (rig_.data (), HAMLIB_CACHE_ALL); @@ -653,7 +657,7 @@ int HamlibTransceiver::do_start () resolution = -1; // best guess } -#if HAVE_HAMLIB_CACHING +#if HAVE_HAMLIB_CACHING || HAVE_HAMLIB_OLD_CACHING // revert Hamlib cache timeout rig_set_cache_timeout_ms (rig_.data (), HAMLIB_CACHE_ALL, orig_cache_timeout); #endif diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 372e74bc5..9fb3341d1 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -3019,34 +3019,19 @@ void MainWindow::decode() //decode() if( m_diskData ) { dec_data.params.lapcqonly=false; } - m_msec0=QDateTime::currentMSecsSinceEpoch(); if(!m_dataAvailable or m_TRperiod==0.0) return; ui->DecodeButton->setChecked (true); - if(!dec_data.params.nagain && m_diskData && (m_TRperiod >= 60.0)) { + if(!dec_data.params.nagain && m_diskData && m_TRperiod >= 60.) { dec_data.params.nutc=dec_data.params.nutc/100; } if(dec_data.params.nagain==0 && dec_data.params.newdat==1 && (!m_diskData)) { - qint64 nperiods=now.toMSecsSinceEpoch()/(1000.0*m_TRperiod); - m_dateTimeSeqStart=QDateTime::fromMSecsSinceEpoch(qint64(1000.0*nperiods*m_TRperiod)).toUTC(); - qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000; - int imin=ms/60000; - int ihr=imin/60; - imin=imin % 60; - if(m_TRperiod>=60) imin=imin - (imin % (int(m_TRperiod)/60)); - dec_data.params.nutc=100*ihr + imin; - if(m_TRperiod < 60) { - qint64 ms=1000.0*(2.0-m_TRperiod); - if(m_mode=="FST4") ms=1000.0*(6.0-m_TRperiod); - //Adjust for FT8 early decode: - if(m_mode=="FT8" and m_ihsym==m_earlyDecode and !m_diskData) ms+=(m_hsymStop-m_earlyDecode)*288; - if(m_mode=="FT8" and m_ihsym==m_earlyDecode2 and !m_diskData) ms+=(m_hsymStop-m_earlyDecode2)*288; - QDateTime t=QDateTime::currentDateTimeUtc().addMSecs(ms); - ihr=t.toString("hh").toInt(); - imin=t.toString("mm").toInt(); - int isec=t.toString("ss").toInt(); - isec=isec - fmod(double(isec),m_TRperiod); - dec_data.params.nutc=10000*ihr + 100*imin + isec; - } + auto t_start = qt_truncate_date_time_to (QDateTime::currentDateTimeUtc (), m_TRperiod * 1.e3); + auto t = t_start.time (); + dec_data.params.nutc = t.hour () * 100 + t.minute (); + if (m_TRperiod < 60.) + { + dec_data.params.nutc = dec_data.params.nutc * 100 + t.second (); + } } if(m_nPick==1 and !m_diskData) { diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 071ffd90d..8c19c8302 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -401,7 +401,6 @@ private: qint64 m_msErase; qint64 m_secBandChanged; qint64 m_freqMoon; - qint64 m_msec0; qint64 m_fullFoxCallTime; Frequency m_freqNominal; diff --git a/wsjtx_config.h.in b/wsjtx_config.h.in index 0866cf061..7da6a4cdd 100644 --- a/wsjtx_config.h.in +++ b/wsjtx_config.h.in @@ -19,6 +19,7 @@ extern "C" { #cmakedefine PROJECT_SAMPLES_URL "@PROJECT_SAMPLES_URL@" #cmakedefine PROJECT_SUMMARY_DESCRIPTION "@PROJECT_SUMMARY_DESCRIPTION@" +#cmakedefine01 HAVE_HAMLIB_OLD_CACHING #cmakedefine01 HAVE_HAMLIB_CACHING #cmakedefine01 WSJT_SHARED_RUNTIME