From 72bce860d87eecb96b12169a920efc895cc0f9b7 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Tue, 28 May 2019 11:25:28 +0100 Subject: [PATCH 1/6] Remove references to N1MM on the Settings dialog as it now uses the WSJT-X UDP messages The second UDP server and port are noted as deprecated since that channel is no longer used for its original purpose, namely N1MM Logger+ consumption of ADIF logged QSO records. This has been marked as deprecated rather than removing since other applications have unilaterally chosen to use this feed rather than the documented WSJT-X UDP message protocol which contains the same information and more. Expect this UDP channel to be removed in some future WSJT-X release. --- Configuration.ui | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Configuration.ui b/Configuration.ui index 9bc5f35aa..4fd9cc1d2 100644 --- a/Configuration.ui +++ b/Configuration.ui @@ -7,7 +7,7 @@ 0 0 546 - 536 + 553 @@ -1912,7 +1912,7 @@ for assessing propagation and system performance. - N1MM Logger+ Broadcasts + Secondary UDP Server (deprecated) @@ -1928,7 +1928,7 @@ for assessing propagation and system performance. - <html><head/><body><p>N1MM Server name or IP address:</p></body></html> + Server name or IP address: n1mm_server_name_line_edit @@ -1945,7 +1945,7 @@ for assessing propagation and system performance. - <html><head/><body><p>N1MM Server port number:</p></body></html> + Server port number: n1mm_server_port_spin_box From e3ecd552813818a83c4781158ac53b140a6e43bc Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Tue, 28 May 2019 18:28:12 +0100 Subject: [PATCH 2/6] Put EU VHF contest mode serial numbers into the ADIF SRX and STX fields --- logbook/logbook.cpp | 41 ++++++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/logbook/logbook.cpp b/logbook/logbook.cpp index b84b65c1a..aa2b7e39e 100644 --- a/logbook/logbook.cpp +++ b/logbook/logbook.cpp @@ -89,24 +89,43 @@ QByteArray LogBook::QSOToADIF (QString const& hisCall, QString const& hisGrid, Q auto words = xSent.split (' ', QString::SkipEmptyParts); if (words.size () > 1) { - bool ok; - auto sn = words.back ().toUInt (&ok); - if (ok && sn) + if (words.back ().toUInt ()) { // assume last word is a serial if there are at least // two words and if it is positive numeric - t += " ' + words.back (); + t += " ' + words.back (); + } + else + { + if (words.front ().toUInt () && words.front ().size () > 3) // EU VHF contest mode + { + auto sn_text = words.front ().mid (2); + // assume first word is report+serial if there are + // at least two words and if the first word less the + // first two characters is a positive numeric + t += " ' + sn_text; + } } } } if (xRcvd.size ()) { - QString t1=""; - if(xRcvd.split(" ").size()==2) t1=xRcvd.split(" ").at(1); - if(t1.toInt()>0) { - t += " " + t1; - } else { - t += " " + t1; - } + auto words = xRcvd.split (' ', QString::SkipEmptyParts); + if (words.size () == 2) + { + if (words.at (1).toUInt ()) + { + t += " " + words.at (1); + } + else if (words.at (0).toUInt () && words.at (0).size () > 3) // EU VHF contest exchange + { + // strip report and set SRX to serial + t += " " + words.at (0).mid (2); + } + else + { + t += " " + words.at (1); + } + } } return t.toLatin1(); } From e1451202f45ca8ed6f6e0a06764e4c575a257d2e Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Tue, 28 May 2019 19:00:13 +0100 Subject: [PATCH 3/6] CMake updates to remove warnings when using recent CMake versions --- CMake/Modules/Findhamlib.cmake | 7 +++++-- CMakeLists.txt | 4 ++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CMake/Modules/Findhamlib.cmake b/CMake/Modules/Findhamlib.cmake index 98419bda1..234083ae1 100644 --- a/CMake/Modules/Findhamlib.cmake +++ b/CMake/Modules/Findhamlib.cmake @@ -19,9 +19,12 @@ find_path (__hamlib_pc_path NAMES hamlib.pc PATH_SUFFIXES lib/pkgconfig lib64/pkgconfig ) if (__hamlib_pc_path) - set (ENV{PKG_CONFIG_PATH} "${__hamlib_pc_path}" "$ENV{PKG_CONFIG_PATH}") - unset (__hamlib_pc_path CACHE) + set (__pc_path $ENV{PKG_CONFIG_PATH}) + list (APPEND __pc_path "${__hamlib_pc_path}") + set (ENV{PKG_CONFIG_PATH} "${__pc_path}") + unset (__pc_path CACHE) endif () +unset (__hamlib_pc_path CACHE) # Use pkg-config to get hints about paths, libs and, flags unset (__pkg_config_checked_hamlib CACHE) diff --git a/CMakeLists.txt b/CMakeLists.txt index db716d464..418173a73 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,10 @@ if (POLICY CMP0063) cmake_policy (SET CMP0063 NEW) # honour visibility properties for all library types endif (POLICY CMP0063) +if (POLICY CMP0071) + cmake_policy (SET CMP0071 NEW) # run automoc and autouic on generated sources +endif (POLICY CMP0071) + include (${PROJECT_SOURCE_DIR}/CMake/VersionCompute.cmake) message (STATUS "Building ${CMAKE_PROJECT_NAME}-${wsjtx_VERSION}") From df4e00605ac7ce787df470973b679afd0424d371 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Thu, 30 May 2019 23:21:41 +0100 Subject: [PATCH 4/6] Better handling of exceptions thrown from contructors --- main.cpp | 2 ++ models/CabrilloLog.cpp | 58 +++++++++++++++++++++++------------------- 2 files changed, 34 insertions(+), 26 deletions(-) diff --git a/main.cpp b/main.cpp index fd510bffb..cd4129701 100644 --- a/main.cpp +++ b/main.cpp @@ -380,10 +380,12 @@ int main(int argc, char *argv[]) } catch (std::exception const& e) { + MessageBox::critical_message (nullptr, QApplication::translate ("main", "Fatal error"), e.what ()); std::cerr << "Error: " << e.what () << '\n'; } catch (...) { + MessageBox::critical_message (nullptr, QApplication::translate ("main", "Unexpected fatal error")); std::cerr << "Unexpected fatal error\n"; throw; // hoping the runtime might tell us more about the exception } diff --git a/models/CabrilloLog.cpp b/models/CabrilloLog.cpp index 1fee9b148..1ef2fcc30 100644 --- a/models/CabrilloLog.cpp +++ b/models/CabrilloLog.cpp @@ -22,6 +22,7 @@ public: impl (Configuration const *); QString cabrillo_frequency_string (Radio::Frequency frequency) const; + void create_table (); Configuration const * configuration_; QSqlQuery mutable dupe_query_; @@ -34,19 +35,25 @@ CabrilloLog::impl::impl (Configuration const * configuration) { if (!database ().tables ().contains ("cabrillo_log")) { - QSqlQuery query; - SQL_error_check (query, static_cast (&QSqlQuery::exec), - "CREATE TABLE cabrillo_log (" - " id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL," - " frequency INTEGER NOT NULL," - " \"when\" DATETIME NOT NULL," - " call VARCHAR(20) NOT NULL," - " exchange_sent VARCHAR(32) NOT NULL," - " exchange_rcvd VARCHAR(32) NOT NULL," - " band VARCHAR(6) NOT NULL" - ")"); + create_table (); } + setTable ("cabrillo_log"); + setEditStrategy (QSqlTableModel::OnFieldChange); + setHeaderData (fieldIndex ("frequency"), Qt::Horizontal, tr ("Freq(kHz)")); + setHeaderData (fieldIndex ("when"), Qt::Horizontal, tr ("Date & Time(UTC)")); + setHeaderData (fieldIndex ("call"), Qt::Horizontal, tr ("Call")); + setHeaderData (fieldIndex ("exchange_sent"), Qt::Horizontal, tr ("Sent")); + setHeaderData (fieldIndex ("exchange_rcvd"), Qt::Horizontal, tr ("Rcvd")); + setHeaderData (fieldIndex ("band"), Qt::Horizontal, tr ("Band")); + + // This descending order by time is important, it makes the view + // place the latest row at the top, without this the model/view + // interactions are both sluggish and unhelpful. + setSort (fieldIndex ("when"), Qt::DescendingOrder); + + SQL_error_check (*this, &QSqlTableModel::select); + SQL_error_check (dupe_query_, &QSqlQuery::prepare, "SELECT " " COUNT(*) " @@ -67,22 +74,21 @@ CabrilloLog::impl::impl (Configuration const * configuration) " cabrillo_log " " ORDER BY " " \"when\""); - - setEditStrategy (QSqlTableModel::OnFieldChange); - setTable ("cabrillo_log"); - setHeaderData (fieldIndex ("frequency"), Qt::Horizontal, tr ("Freq(kHz)")); - setHeaderData (fieldIndex ("when"), Qt::Horizontal, tr ("Date & Time(UTC)")); - setHeaderData (fieldIndex ("call"), Qt::Horizontal, tr ("Call")); - setHeaderData (fieldIndex ("exchange_sent"), Qt::Horizontal, tr ("Sent")); - setHeaderData (fieldIndex ("exchange_rcvd"), Qt::Horizontal, tr ("Rcvd")); - setHeaderData (fieldIndex ("band"), Qt::Horizontal, tr ("Band")); +} - // This descending order by time is important, it makes the view - // place the latest row at the top, without this the model/view - // interactions are both sluggish and unhelpful. - setSort (fieldIndex ("when"), Qt::DescendingOrder); - - SQL_error_check (*this, &QSqlTableModel::select); +void CabrilloLog::impl::create_table () +{ + QSqlQuery query; + SQL_error_check (query, static_cast (&QSqlQuery::exec), + "CREATE TABLE cabrillo_log (" + " id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL," + " frequency INTEGER NOT NULL," + " \"when\" DATETIME NOT NULL," + " call VARCHAR(20) NOT NULL," + " exchange_sent VARCHAR(32) NOT NULL," + " exchange_rcvd VARCHAR(32) NOT NULL," + " band VARCHAR(6) NOT NULL" + ")"); } // frequency here is in kHz From 86c48cb49f3dfb7752a17b80a3ab06d98cd9878d Mon Sep 17 00:00:00 2001 From: sirhc808 Date: Mon, 1 Jul 2019 14:19:43 -0500 Subject: [PATCH 5/6] Update to use current version of Qt's CMake support --- CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index db716d464..a4511b84d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -860,10 +860,7 @@ message (STATUS "hamlib_LIBRARY_DIRS: ${hamlib_LIBRARY_DIRS}") # # Widgets finds its own dependencies. -find_package (Qt5Widgets 5 REQUIRED) -find_package (Qt5Multimedia 5 REQUIRED) -find_package (Qt5PrintSupport 5 REQUIRED) -find_package (Qt5Sql 5 REQUIRED) +find_package (Qt5 COMPONENTS Widgets Multimedia PrintSupport Sql REQUIRED) if (WIN32) add_definitions (-DQT_NEEDS_QTMAIN) From fa44ed84c52a05560f76deafd8864e43b3ae6966 Mon Sep 17 00:00:00 2001 From: Steve Franke Date: Wed, 3 Jul 2019 10:55:13 -0500 Subject: [PATCH 6/6] Remove an unused routine. Minor tweaks. --- CMakeLists.txt | 4 --- lib/ft4/averaged_mf.f90 | 64 -------------------------------------- lib/ft4/getcandidates4.f90 | 5 +-- lib/ft4_decode.f90 | 1 - 4 files changed, 1 insertion(+), 73 deletions(-) delete mode 100644 lib/ft4/averaged_mf.f90 diff --git a/CMakeLists.txt b/CMakeLists.txt index d5fbfb8f5..8f3cb28db 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -391,7 +391,6 @@ set (wsjt_FSRCS lib/astro0.f90 lib/avecho.f90 lib/averms.f90 - lib/ft4/averaged_mf.f90 lib/azdist.f90 lib/badmsg.f90 lib/ft8/baseline.f90 @@ -1319,9 +1318,6 @@ target_link_libraries (msk144sim wsjt_fort wsjt_cxx) add_executable (ft4sim lib/ft4/ft4sim.f90 wsjtx.rc) target_link_libraries (ft4sim wsjt_fort wsjt_cxx) -add_executable (averaged_mf lib/ft4/averaged_mf.f90 wsjtx.rc) -target_link_libraries (averaged_mf wsjt_fort wsjt_cxx) - add_executable (ft4sim_mult lib/ft4/ft4sim_mult.f90 wsjtx.rc) target_link_libraries (ft4sim_mult wsjt_fort wsjt_cxx) diff --git a/lib/ft4/averaged_mf.f90 b/lib/ft4/averaged_mf.f90 deleted file mode 100644 index 2986572b3..000000000 --- a/lib/ft4/averaged_mf.f90 +++ /dev/null @@ -1,64 +0,0 @@ -program averaged_mf - - parameter (nsps=32) - complex cgfsk(3*nsps,64) - complex clin(3*nsps,64) - complex cavg(3*nsps,4) - complex cavl(3*nsps,4) - real pulse(3*nsps) - real dphi(3*nsps) - - do i=1,3*NSPS - t=(i-1.5*nsps)/real(nsps) - pulse(i)=gfsk_pulse(1.0,t) - enddo - - twopi=8.0*atan(1.0) - hmod=1.0 - dphi_peak=twopi*hmod/real(nsps) - - do iwf=1,64 - i0=mod((iwf-1)/16,4) - i1=mod((iwf-1)/4,4) - i2=mod(iwf-1,4) - dphi=0.0 - dphi(1:64)=dphi_peak*pulse(33:96)*i1 - dphi(1:96)=dphi(1:96)+dphi_peak*pulse(1:96)*i0 - dphi(33:96)=dphi(33:96)+dphi_peak*pulse(1:64)*i2 - phi=0.0 - do j=1,96 - cgfsk(j,iwf)=cmplx(cos(phi),sin(phi)) - phi=mod(phi+dphi(j),twopi) - enddo - cgfsk(:,iwf)=cgfsk(:,iwf)*conjg(cgfsk(48,iwf)) - enddo - - do iwf=1,64 - i0=mod((iwf-1)/16,4) - i1=mod((iwf-1)/4,4) - i2=mod(iwf-1,4) - dphi=0.0 - dphi(1:32)=dphi_peak*i1 - dphi(33:64)=dphi_peak*i0 - dphi(65:96)=dphi_peak*i2 - phi=0.0 - do j=1,96 - clin(j,iwf)=cmplx(cos(phi),sin(phi)) - phi=mod(phi+dphi(j),twopi) - enddo - enddo - - - do i=1,4 - ib=(i-1)*16+1 - ie=ib+15 - cavg(:,i)=sum(cgfsk(:,ib:ie),2)/16.0 - cavl(:,i)=sum(clin(:,ib:ie),2)/16.0 - do j=1,96 -write(*,*) j -write(21,*) i,j,real(cavg(j,i)),imag(cavg(j,i)),real(cavl(j,i)),imag(cavl(j,i)) - enddo - enddo - -end program averaged_mf - diff --git a/lib/ft4/getcandidates4.f90 b/lib/ft4/getcandidates4.f90 index e9860b7a7..3f62e8141 100644 --- a/lib/ft4/getcandidates4.f90 +++ b/lib/ft4/getcandidates4.f90 @@ -10,7 +10,6 @@ subroutine getcandidates4(dd,fa,fb,syncmin,nfqso,maxcand,savg,candidate, & complex cx(0:NH1) real candidate(2,maxcand),candidatet(2,maxcand) real dd(NMAX) - integer ipk(1) equivalence (x,cx) logical first data first/.true./ @@ -33,9 +32,7 @@ subroutine getcandidates4(dd,fa,fb,syncmin,nfqso,maxcand,savg,candidate, & if(ib.gt.NMAX) exit x=fac*dd(ia:ib)*window call four2a(x,NFFT1,1,-1,0) !r2c FFT - do i=1,NH1 - s(i,j)=real(cx(i))**2 + aimag(cx(i))**2 - enddo + s(1:NH1,j)=abs(cx(1:NH1))**2 savg=savg + s(1:NH1,j) !Average spectrum enddo savg=savg/NHSYM diff --git a/lib/ft4_decode.f90 b/lib/ft4_decode.f90 index 1fd60efa6..c60ee179a 100644 --- a/lib/ft4_decode.f90 +++ b/lib/ft4_decode.f90 @@ -34,7 +34,6 @@ contains character message*37,msgsent*37 character c77*77 character*37 decodes(100) - character*512 data_dir,fname character*17 cdatetime0 character*12 mycall,hiscall character*12 mycall0,hiscall0