From 4317f54b1a534b5e6c9a5052429e35d4e0bbb9e6 Mon Sep 17 00:00:00 2001 From: sirhc808 Date: Mon, 1 Jul 2019 19:36:14 -0500 Subject: [PATCH 01/10] simple CMake fix to use Qt's latest CMake support --- CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a2d6dd396..897139201 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -889,10 +889,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 1f282153ebb35e6640e4bc37ffc7387e3fe2c708 Mon Sep 17 00:00:00 2001 From: sirhc808 Date: Mon, 1 Jul 2019 20:31:33 -0500 Subject: [PATCH 02/10] clean up a few warnings --- HRDTransceiver.cpp | 2 +- qcustomplot-source/qcustomplot.h | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/HRDTransceiver.cpp b/HRDTransceiver.cpp index c44914145..873c87184 100644 --- a/HRDTransceiver.cpp +++ b/HRDTransceiver.cpp @@ -1021,7 +1021,7 @@ QString HRDTransceiver::send_command (QString const& cmd, bool no_debug, bool pr if (!recurse && prepend_context) { auto radio_name = send_command ("get radio", true, current_radio_, true); - auto radio_iter = std::find_if (radios_.begin (), radios_.end (), [this, &radio_name] (RadioMap::value_type const& radio) + auto radio_iter = std::find_if (radios_.begin (), radios_.end (), [&radio_name] (RadioMap::value_type const& radio) { return std::get<1> (radio) == radio_name; }); diff --git a/qcustomplot-source/qcustomplot.h b/qcustomplot-source/qcustomplot.h index 0b1bb274e..b79c809de 100644 --- a/qcustomplot-source/qcustomplot.h +++ b/qcustomplot-source/qcustomplot.h @@ -3298,7 +3298,7 @@ public: void setSelectionDecorator(QCPSelectionDecorator *decorator); // introduced virtual methods: - virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const = 0; + virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE = 0; virtual QCPPlottableInterface1D *interface1D() { return 0; } virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const = 0; virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const = 0; @@ -3438,7 +3438,7 @@ public: QCPAxis *keyAxis() const { return mKeyAxis.data(); } QCPAxis *valueAxis() const { return mValueAxis.data(); } QCPAxisRect *axisRect() const; - virtual QPointF pixelPosition() const; + virtual QPointF pixelPosition() const Q_DECL_OVERRIDE; // setters: void setType(PositionType type); @@ -5995,16 +5995,16 @@ public: void addData(double errorMinus, double errorPlus); // virtual methods of 1d plottable interface: - virtual int dataCount() const; - virtual double dataMainKey(int index) const; - virtual double dataSortKey(int index) const; - virtual double dataMainValue(int index) const; - virtual QCPRange dataValueRange(int index) const; - virtual QPointF dataPixelPosition(int index) const; - virtual bool sortKeyIsMainKey() const; - virtual QCPDataSelection selectTestRect(const QRectF &rect, bool onlySelectable) const; - virtual int findBegin(double sortKey, bool expandedRange=true) const; - virtual int findEnd(double sortKey, bool expandedRange=true) const; + virtual int dataCount() const Q_DECL_OVERRIDE; + virtual double dataMainKey(int index) const Q_DECL_OVERRIDE; + virtual double dataSortKey(int index) const Q_DECL_OVERRIDE; + virtual double dataMainValue(int index) const Q_DECL_OVERRIDE; + virtual QCPRange dataValueRange(int index) const Q_DECL_OVERRIDE; + virtual QPointF dataPixelPosition(int index) const Q_DECL_OVERRIDE; + virtual bool sortKeyIsMainKey() const Q_DECL_OVERRIDE; + virtual QCPDataSelection selectTestRect(const QRectF &rect, bool onlySelectable) const Q_DECL_OVERRIDE; + virtual int findBegin(double sortKey, bool expandedRange=true) const Q_DECL_OVERRIDE; + virtual int findEnd(double sortKey, bool expandedRange=true) const Q_DECL_OVERRIDE; // reimplemented virtual methods: virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE; From 84fd0ed7c770d9ff8366ed56899ebf9a4066dc05 Mon Sep 17 00:00:00 2001 From: sirhc808 Date: Mon, 1 Jul 2019 21:10:43 -0500 Subject: [PATCH 03/10] clean up a few warnings --- Detector.cpp | 1 - Detector.hpp | 1 - SampleDownloader/Directory.cpp | 2 +- UDPExamples/UDPDaemon.cpp | 2 +- decodedtext.h | 1 - lib/decoder.f90 | 6 +- lib/ft4/getcandidates4.f90 | 155 ++++++++++++++------------- lib/ft4/sync4d.f90 | 187 ++++++++++++++++----------------- lib/ft4_decode.f90 | 1 - lib/msk144code.f90 | 164 ++++++++++++++--------------- lib/qra64code.f90 | 6 +- widgets/echoplot.cpp | 1 - widgets/plotter.cpp | 1 - widgets/plotter.h | 4 +- 14 files changed, 260 insertions(+), 272 deletions(-) diff --git a/Detector.cpp b/Detector.cpp index 05a631b13..0cd0714e7 100644 --- a/Detector.cpp +++ b/Detector.cpp @@ -18,7 +18,6 @@ Detector::Detector (unsigned frameRate, double periodLengthInSeconds, , m_period (periodLengthInSeconds) , m_downSampleFactor (downSampleFactor) , m_samplesPerFFT {max_buffer_size} - , m_ns (999) , m_buffer ((downSampleFactor > 1) ? new short [max_buffer_size * downSampleFactor] : nullptr) , m_bufferPos (0) diff --git a/Detector.hpp b/Detector.hpp index 4d584c130..412961d6b 100644 --- a/Detector.hpp +++ b/Detector.hpp @@ -46,7 +46,6 @@ private: double m_period; unsigned m_downSampleFactor; qint32 m_samplesPerFFT; // after any down sampling - qint32 m_ns; static size_t const max_buffer_size {7 * 512}; QScopedArrayPointer m_buffer; // de-interleaved sample buffer // big enough for all the diff --git a/SampleDownloader/Directory.cpp b/SampleDownloader/Directory.cpp index 91918021d..3c7504424 100644 --- a/SampleDownloader/Directory.cpp +++ b/SampleDownloader/Directory.cpp @@ -54,7 +54,7 @@ Directory::Directory (Configuration const * configuration connect (network_manager_, &QNetworkAccessManager::authenticationRequired , this, &Directory::authentication); - connect (this, &Directory::itemChanged, [this] (QTreeWidgetItem * item) { + connect (this, &Directory::itemChanged, [] (QTreeWidgetItem * item) { switch (item->type ()) { case FileNode::Type: diff --git a/UDPExamples/UDPDaemon.cpp b/UDPExamples/UDPDaemon.cpp index 0ee202dc7..20f1995b3 100644 --- a/UDPExamples/UDPDaemon.cpp +++ b/UDPExamples/UDPDaemon.cpp @@ -146,7 +146,7 @@ public: : server_ {new MessageServer {this}} { // connect up server - connect (server_, &MessageServer::error, [this] (QString const& message) { + connect (server_, &MessageServer::error, [] (QString const& message) { std::cerr << tr ("Network Error: %1").arg ( message).toStdString () << std::endl; }); connect (server_, &MessageServer::client_opened, this, &Server::add_client); diff --git a/decodedtext.h b/decodedtext.h index 88062231e..b228f921b 100644 --- a/decodedtext.h +++ b/decodedtext.h @@ -77,7 +77,6 @@ private: QString string_; int padding_; - bool contest_mode_; QString message_; QString message0_; bool is_standard_; diff --git a/lib/decoder.f90 b/lib/decoder.f90 index d3f1153f4..e6ec7473d 100644 --- a/lib/decoder.f90 +++ b/lib/decoder.f90 @@ -133,7 +133,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample) n30fox(j)=n m=n30max-n if(len(trim(g2fox(j))).eq.4) then - call azdist(mygrid,g2fox(j)//' ',0.d0,nAz,nEl,nDmiles, & + call azdist(mygrid,g2fox(j)//' ',0.d0,nAz,nEl,nDmiles, & nDkm,nHotAz,nHotABetter) else nDkm=9999 @@ -588,9 +588,7 @@ contains real, intent(in) :: dt real, intent(in) :: freq character(len=37), intent(in) :: decoded - character c1*12,c2*12,g2*4,w*4 - integer i0,i1,i2,i3,i4,i5,n30,nwrap - integer, intent(in) :: nap + integer, intent(in) :: nap real, intent(in) :: qual character*2 annot character*37 decoded0 diff --git a/lib/ft4/getcandidates4.f90 b/lib/ft4/getcandidates4.f90 index f7cef02ef..a13635663 100644 --- a/lib/ft4/getcandidates4.f90 +++ b/lib/ft4/getcandidates4.f90 @@ -1,78 +1,77 @@ -subroutine getcandidates4(dd,fa,fb,syncmin,nfqso,maxcand,savg,candidate, & - ncand,sbase) - - include 'ft4_params.f90' - real s(NH1,NHSYM) - real savg(NH1),savsm(NH1) - real sbase(NH1) - real x(NFFT1) - real window(NFFT1) - complex cx(0:NH1) - real candidate(3,maxcand) - real dd(NMAX) - integer ipk(1) - equivalence (x,cx) - logical first - data first/.true./ - save first,window - - if(first) then - first=.false. - pi=4.0*atan(1.) - window=0. - call nuttal_window(window,NFFT1) - endif - -! Compute symbol spectra, stepping by NSTEP steps. - savg=0. - df=12000.0/NFFT1 - fac=1.0/300.0 - do j=1,NHSYM - ia=(j-1)*NSTEP + 1 - ib=ia+NFFT1-1 - 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 - savg=savg + s(1:NH1,j) !Average spectrum - enddo - savg=savg/NHSYM - savsm=0. - do i=8,NH1-7 - savsm(i)=sum(savg(i-7:i+7))/15. - enddo - - nfa=fa/df - if(nfa.lt.nint(200.0/df)) nfa=nint(200.0/df) - nfb=fb/df - if(nfb.gt.nint(5000.0/df)) nfb=nint(5000.0/df) - ncand=0 - call ft4_baseline(savg,nfa,nfb,sbase) - if(any(sbase(nfa:nfb).le.0)) return - savsm(nfa:nfb)=savsm(nfa:nfb)/sbase(nfa:nfb) - f_offset = -1.5*12000.0/NSPS - do i=nfa+1,nfb-1 - if(savsm(i).ge.savsm(i-1) .and. savsm(i).ge.savsm(i+1) .and. & - savsm(i).ge.syncmin) then - den=savsm(i-1)-2*savsm(i)+savsm(i+1) - del=0. - if(den.ne.0.0) del=0.5*(savsm(i-1)-savsm(i+1))/den - fpeak=(i+del)*df+f_offset - if(fpeak.lt.0.0 .or. fpeak.gt.4910.0) cycle - speak=savsm(i) - 0.25*(savsm(i-1)-savsm(i+1))*del - ncand=ncand+1 - if(ncand.gt.maxcand) then - ncand=maxcand - exit - endif - candidate(1,ncand)=fpeak - candidate(2,ncand)=-99.99 - candidate(3,ncand)=speak - if(ncand.eq.maxcand) exit - endif - enddo - -return -end subroutine getcandidates4 +subroutine getcandidates4(dd,fa,fb,syncmin,nfqso,maxcand,savg,candidate, & + ncand,sbase) + + include 'ft4_params.f90' + real s(NH1,NHSYM) + real savg(NH1),savsm(NH1) + real sbase(NH1) + real x(NFFT1) + real window(NFFT1) + complex cx(0:NH1) + real candidate(3,maxcand) + real dd(NMAX) + equivalence (x,cx) + logical first + data first/.true./ + save first,window + + if(first) then + first=.false. + pi=4.0*atan(1.) + window=0. + call nuttal_window(window,NFFT1) + endif + +! Compute symbol spectra, stepping by NSTEP steps. + savg=0. + df=12000.0/NFFT1 + fac=1.0/300.0 + do j=1,NHSYM + ia=(j-1)*NSTEP + 1 + ib=ia+NFFT1-1 + 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 + savg=savg + s(1:NH1,j) !Average spectrum + enddo + savg=savg/NHSYM + savsm=0. + do i=8,NH1-7 + savsm(i)=sum(savg(i-7:i+7))/15. + enddo + + nfa=fa/df + if(nfa.lt.nint(200.0/df)) nfa=nint(200.0/df) + nfb=fb/df + if(nfb.gt.nint(5000.0/df)) nfb=nint(5000.0/df) + ncand=0 + call ft4_baseline(savg,nfa,nfb,sbase) + if(any(sbase(nfa:nfb).le.0)) return + savsm(nfa:nfb)=savsm(nfa:nfb)/sbase(nfa:nfb) + f_offset = -1.5*12000.0/NSPS + do i=nfa+1,nfb-1 + if(savsm(i).ge.savsm(i-1) .and. savsm(i).ge.savsm(i+1) .and. & + savsm(i).ge.syncmin) then + den=savsm(i-1)-2*savsm(i)+savsm(i+1) + del=0. + if(den.ne.0.0) del=0.5*(savsm(i-1)-savsm(i+1))/den + fpeak=(i+del)*df+f_offset + if(fpeak.lt.0.0 .or. fpeak.gt.4910.0) cycle + speak=savsm(i) - 0.25*(savsm(i-1)-savsm(i+1))*del + ncand=ncand+1 + if(ncand.gt.maxcand) then + ncand=maxcand + exit + endif + candidate(1,ncand)=fpeak + candidate(2,ncand)=-99.99 + candidate(3,ncand)=speak + if(ncand.eq.maxcand) exit + endif + enddo + +return +end subroutine getcandidates4 diff --git a/lib/ft4/sync4d.f90 b/lib/ft4/sync4d.f90 index 28cb10b99..64e1c7e11 100644 --- a/lib/ft4/sync4d.f90 +++ b/lib/ft4/sync4d.f90 @@ -1,94 +1,93 @@ -subroutine sync4d(cd0,i0,ctwk,itwk,sync) - -! Compute sync power for a complex, downsampled FT4 signal. - - include 'ft4_params.f90' - parameter(NP=NMAX/NDOWN,NSS=NSPS/NDOWN) - complex cd0(0:NP-1) - complex csynca(2*NSS),csyncb(2*NSS),csyncc(2*NSS),csyncd(2*NSS) - complex csync2(2*NSS) - complex ctwk(2*NSS) - complex z1,z2,z3,z4 - complex zz1,zz2,zz3,zz4 - logical first - integer icos4a(0:3),icos4b(0:3),icos4c(0:3),icos4d(0:3) - data icos4a/0,1,3,2/ - data icos4b/1,0,2,3/ - data icos4c/2,3,1,0/ - data icos4d/3,2,0,1/ - data first/.true./ - save first,twopi,csynca,csyncb,csyncc,csyncd,fac - - p(z1)=real(z1*fac)**2 + aimag(z1*fac)**2 !Statement function for power - - if( first ) then - twopi=8.0*atan(1.0) - k=1 - phia=0.0 - phib=0.0 - phic=0.0 - phid=0.0 - do i=0,3 - dphia=2*twopi*icos4a(i)/real(NSS) - dphib=2*twopi*icos4b(i)/real(NSS) - dphic=2*twopi*icos4c(i)/real(NSS) - dphid=2*twopi*icos4d(i)/real(NSS) - do j=1,NSS/2 - csynca(k)=cmplx(cos(phia),sin(phia)) - csyncb(k)=cmplx(cos(phib),sin(phib)) - csyncc(k)=cmplx(cos(phic),sin(phic)) - csyncd(k)=cmplx(cos(phid),sin(phid)) - phia=mod(phia+dphia,twopi) - phib=mod(phib+dphib,twopi) - phic=mod(phic+dphic,twopi) - phid=mod(phid+dphid,twopi) - k=k+1 - enddo - enddo - first=.false. - fac=1.0/(2.0*NSS) - endif - - i1=i0 !four Costas arrays - i2=i0+33*NSS - i3=i0+66*NSS - i4=i0+99*NSS - - z1=0. - z2=0. - z3=0. - z4=0. - - if(itwk.eq.1) csync2=ctwk*csynca !Tweak the frequency - if(i1.ge.0 .and. i1+4*NSS-1.le.NP-1) then - z1=sum(cd0(i1:i1+4*NSS-1:2)*conjg(csync2)) - elseif( i1.lt.0 ) then - npts=(i1+4*NSS-1)/2 - if(npts.le.8) then - z1=0. - else - z1=sum(cd0(0:i1+4*NSS-1:2)*conjg(csync2(2*NSS-npts:))) - endif - endif - - if(itwk.eq.1) csync2=ctwk*csyncb !Tweak the frequency - if(i2.ge.0 .and. i2+4*NSS-1.le.NP-1) z2=sum(cd0(i2:i2+4*NSS-1:2)*conjg(csync2)) - - if(itwk.eq.1) csync2=ctwk*csyncc !Tweak the frequency - if(i3.ge.0 .and. i3+4*NSS-1.le.NP-1) z3=sum(cd0(i3:i3+4*NSS-1:2)*conjg(csync2)) - - if(itwk.eq.1) csync2=ctwk*csyncd !Tweak the frequency - if(i4.ge.0 .and. i4+4*NSS-1.le.NP-1) then - z4=sum(cd0(i4:i4+4*NSS-1:2)*conjg(csync2)) - elseif( i4+4*NSS-1.gt.NP-1 ) then - npts=(NP-1-i4+1)/2 - if(npts.le.8) then - z4=0. - else - z4=sum(cd0(i4:i4+2*npts-1:2)*conjg(csync2(1:npts))) - endif - endif - sync = p(z1) + p(z2) + p(z3) + p(z4) - - return -end subroutine sync4d +subroutine sync4d(cd0,i0,ctwk,itwk,sync) + +! Compute sync power for a complex, downsampled FT4 signal. + + include 'ft4_params.f90' + parameter(NP=NMAX/NDOWN,NSS=NSPS/NDOWN) + complex cd0(0:NP-1) + complex csynca(2*NSS),csyncb(2*NSS),csyncc(2*NSS),csyncd(2*NSS) + complex csync2(2*NSS) + complex ctwk(2*NSS) + complex z1,z2,z3,z4 + logical first + integer icos4a(0:3),icos4b(0:3),icos4c(0:3),icos4d(0:3) + data icos4a/0,1,3,2/ + data icos4b/1,0,2,3/ + data icos4c/2,3,1,0/ + data icos4d/3,2,0,1/ + data first/.true./ + save first,twopi,csynca,csyncb,csyncc,csyncd,fac + + p(z1)=real(z1*fac)**2 + aimag(z1*fac)**2 !Statement function for power + + if( first ) then + twopi=8.0*atan(1.0) + k=1 + phia=0.0 + phib=0.0 + phic=0.0 + phid=0.0 + do i=0,3 + dphia=2*twopi*icos4a(i)/real(NSS) + dphib=2*twopi*icos4b(i)/real(NSS) + dphic=2*twopi*icos4c(i)/real(NSS) + dphid=2*twopi*icos4d(i)/real(NSS) + do j=1,NSS/2 + csynca(k)=cmplx(cos(phia),sin(phia)) + csyncb(k)=cmplx(cos(phib),sin(phib)) + csyncc(k)=cmplx(cos(phic),sin(phic)) + csyncd(k)=cmplx(cos(phid),sin(phid)) + phia=mod(phia+dphia,twopi) + phib=mod(phib+dphib,twopi) + phic=mod(phic+dphic,twopi) + phid=mod(phid+dphid,twopi) + k=k+1 + enddo + enddo + first=.false. + fac=1.0/(2.0*NSS) + endif + + i1=i0 !four Costas arrays + i2=i0+33*NSS + i3=i0+66*NSS + i4=i0+99*NSS + + z1=0. + z2=0. + z3=0. + z4=0. + + if(itwk.eq.1) csync2=ctwk*csynca !Tweak the frequency + if(i1.ge.0 .and. i1+4*NSS-1.le.NP-1) then + z1=sum(cd0(i1:i1+4*NSS-1:2)*conjg(csync2)) + elseif( i1.lt.0 ) then + npts=(i1+4*NSS-1)/2 + if(npts.le.8) then + z1=0. + else + z1=sum(cd0(0:i1+4*NSS-1:2)*conjg(csync2(2*NSS-npts:))) + endif + endif + + if(itwk.eq.1) csync2=ctwk*csyncb !Tweak the frequency + if(i2.ge.0 .and. i2+4*NSS-1.le.NP-1) z2=sum(cd0(i2:i2+4*NSS-1:2)*conjg(csync2)) + + if(itwk.eq.1) csync2=ctwk*csyncc !Tweak the frequency + if(i3.ge.0 .and. i3+4*NSS-1.le.NP-1) z3=sum(cd0(i3:i3+4*NSS-1:2)*conjg(csync2)) + + if(itwk.eq.1) csync2=ctwk*csyncd !Tweak the frequency + if(i4.ge.0 .and. i4+4*NSS-1.le.NP-1) then + z4=sum(cd0(i4:i4+4*NSS-1:2)*conjg(csync2)) + elseif( i4+4*NSS-1.gt.NP-1 ) then + npts=(NP-1-i4+1)/2 + if(npts.le.8) then + z4=0. + else + z4=sum(cd0(i4:i4+2*npts-1:2)*conjg(csync2(1:npts))) + endif + endif + sync = p(z1) + p(z2) + p(z3) + p(z4) + + return +end subroutine sync4d diff --git a/lib/ft4_decode.f90 b/lib/ft4_decode.f90 index 50c9fa47d..454280c19 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 diff --git a/lib/msk144code.f90 b/lib/msk144code.f90 index 81a185159..e75ebf3d3 100644 --- a/lib/msk144code.f90 +++ b/lib/msk144code.f90 @@ -1,82 +1,82 @@ -program msk144code - -! Provides examples of message packing, bit and symbol ordering, -! LDPC encoding, and other necessary details of the MSK144 protocol. - - use packjt77 - character*77 c77 - character msg*37,msgsent*37,decoded,bad*1,msgtype*18 - integer*4 i4tone(144) - include 'msk144_testmsg.f90' - - nargs=iargc() - if(nargs.ne.1) then - print*,'Usage: msk144code "message"' - print*,' msk144code -t' - print*,' ' - print*,'Examples:' - print*,' msk144code "KA1ABC WB9XYZ EN37"' - print*,' msk144code " R-03"' - print*,' msk144code "KA1ABC WB9XYZ R EN37"' - go to 999 - endif - - call getarg(1,msg) - nmsg=1 - if(msg(1:2).eq."-t") then - nmsg=NTEST - endif - - write(*,1010) -1010 format(4x,"Message",31x,"Decoded",29x,"Err i3.n3"/100("-")) - - do imsg=1,nmsg - if(nmsg.gt.1) msg=testmsg(imsg) - call fmtmsg(msg,iz) !To upper case, collapse multiple blanks - call genmsk_128_90(msg,ichk,msgsent,i4tone,itype) - i3=-1 - n3=-1 - call pack77(msg,i3,n3,c77) - msgtype="" - if(i3.eq.0) then - if(n3.eq.0) msgtype="Free text" - if(n3.eq.1) msgtype="DXpedition mode" - if(n3.eq.2) msgtype="EU VHF Contest" - if(n3.eq.3) msgtype="ARRL Field Day" - if(n3.eq.4) msgtype="ARRL Field Day" - if(n3.eq.5) msgtype="Telemetry" - if(n3.ge.6) msgtype="Undefined type" - endif - if(i3.eq.1) msgtype="Standard msg" - if(i3.eq.2) msgtype="EU VHF Contest" - if(i3.eq.3) msgtype="ARRL RTTY Roundup" - if(i3.eq.4) msgtype="Nonstandard calls" - if(i3.ge.5) msgtype="Undefined msg type" - if(i3.ge.1) n3=-1 - if(i4tone(41).lt.0) then - msgtype="Sh msg" - i3=-1 - endif - bad=" " - if(msg.ne.msgsent) bad="*" - if(i3.eq.0.and.n3.ge.0) then - write(*,1020) imsg,msg,msgsent,bad,i3,n3,msgtype -1020 format(i2,'.',1x,a37,1x,a37,1x,a1,2x,i1,'.',i1,1x,a18) - elseif(i3.ge.1) then - write(*,1022) imsg,msg,msgsent,bad,i3,msgtype -1022 format(i2,'.',1x,a37,1x,a37,1x,a1,2x,i1,'.',1x,1x,a18) - elseif(i3.lt.0) then - write(*,1024) imsg,msg,msgsent,bad,msgtype -1024 format(i2,'.',1x,a37,1x,a37,1x,a1,6x,a18) - endif - - enddo - - if(nmsg.eq.1) then - n=144 - if(i4tone(41).lt.0) n=40 - write(*,1030) i4tone(1:n) -1030 format(/'Channel symbols'/(72i1)) - endif - -999 end program msk144code +program msk144code + +! Provides examples of message packing, bit and symbol ordering, +! LDPC encoding, and other necessary details of the MSK144 protocol. + + use packjt77 + character*77 c77 + character msg*37,msgsent*37,bad*1,msgtype*18 + integer*4 i4tone(144) + include 'msk144_testmsg.f90' + + nargs=iargc() + if(nargs.ne.1) then + print*,'Usage: msk144code "message"' + print*,' msk144code -t' + print*,' ' + print*,'Examples:' + print*,' msk144code "KA1ABC WB9XYZ EN37"' + print*,' msk144code " R-03"' + print*,' msk144code "KA1ABC WB9XYZ R EN37"' + go to 999 + endif + + call getarg(1,msg) + nmsg=1 + if(msg(1:2).eq."-t") then + nmsg=NTEST + endif + + write(*,1010) +1010 format(4x,"Message",31x,"Decoded",29x,"Err i3.n3"/100("-")) + + do imsg=1,nmsg + if(nmsg.gt.1) msg=testmsg(imsg) + call fmtmsg(msg,iz) !To upper case, collapse multiple blanks + call genmsk_128_90(msg,ichk,msgsent,i4tone,itype) + i3=-1 + n3=-1 + call pack77(msg,i3,n3,c77) + msgtype="" + if(i3.eq.0) then + if(n3.eq.0) msgtype="Free text" + if(n3.eq.1) msgtype="DXpedition mode" + if(n3.eq.2) msgtype="EU VHF Contest" + if(n3.eq.3) msgtype="ARRL Field Day" + if(n3.eq.4) msgtype="ARRL Field Day" + if(n3.eq.5) msgtype="Telemetry" + if(n3.ge.6) msgtype="Undefined type" + endif + if(i3.eq.1) msgtype="Standard msg" + if(i3.eq.2) msgtype="EU VHF Contest" + if(i3.eq.3) msgtype="ARRL RTTY Roundup" + if(i3.eq.4) msgtype="Nonstandard calls" + if(i3.ge.5) msgtype="Undefined msg type" + if(i3.ge.1) n3=-1 + if(i4tone(41).lt.0) then + msgtype="Sh msg" + i3=-1 + endif + bad=" " + if(msg.ne.msgsent) bad="*" + if(i3.eq.0.and.n3.ge.0) then + write(*,1020) imsg,msg,msgsent,bad,i3,n3,msgtype +1020 format(i2,'.',1x,a37,1x,a37,1x,a1,2x,i1,'.',i1,1x,a18) + elseif(i3.ge.1) then + write(*,1022) imsg,msg,msgsent,bad,i3,msgtype +1022 format(i2,'.',1x,a37,1x,a37,1x,a1,2x,i1,'.',1x,1x,a18) + elseif(i3.lt.0) then + write(*,1024) imsg,msg,msgsent,bad,msgtype +1024 format(i2,'.',1x,a37,1x,a37,1x,a1,6x,a18) + endif + + enddo + + if(nmsg.eq.1) then + n=144 + if(i4tone(41).lt.0) n=40 + write(*,1030) i4tone(1:n) +1030 format(/'Channel symbols'/(72i1)) + endif + +999 end program msk144code diff --git a/lib/qra64code.f90 b/lib/qra64code.f90 index 5846ec8d7..188b5f0b3 100644 --- a/lib/qra64code.f90 +++ b/lib/qra64code.f90 @@ -5,10 +5,8 @@ program QRA64code ! protocol. use packjt - character*22 msg,msg0,msg1,decoded,cok*3,msgtype*10,arg*12 - character*6 mycall - logical ltext - integer dgen(12),sent(63),dec(12) + character*22 msg,msg0,msg1,decoded,cok*3,msgtype*10 + integer dgen(12),sent(63) integer icos7(0:6) data icos7/2,5,6,0,4,1,3/ !Defines a 7x7 Costas array diff --git a/widgets/echoplot.cpp b/widgets/echoplot.cpp index 0a93e889e..7f5070a21 100644 --- a/widgets/echoplot.cpp +++ b/widgets/echoplot.cpp @@ -160,7 +160,6 @@ void EPlotter::DrawOverlay() //DrawOverlay() // int w = m_WaterfallPixmap.width(); int x,y; - QRect rect; QPainter painter(&m_OverlayPixmap); painter.initFrom(this); QLinearGradient gradient(0, 0, 0 ,m_h2); //fill background with gradient diff --git a/widgets/plotter.cpp b/widgets/plotter.cpp index badeff57b..629d7a7f1 100644 --- a/widgets/plotter.cpp +++ b/widgets/plotter.cpp @@ -327,7 +327,6 @@ void CPlotter::DrawOverlay() //DrawOverlay() float pixperdiv; double df = m_binsPerPixel*m_fftBinWidth; - QRect rect; QPen penOrange(QColor(255,165,0),3); QPen penGreen(Qt::green, 3); //Mark Tol range with green line QPen penRed(Qt::red, 3); //Mark Tx freq with red diff --git a/widgets/plotter.h b/widgets/plotter.h index 2cbfd202b..b3eb85855 100644 --- a/widgets/plotter.h +++ b/widgets/plotter.h @@ -29,8 +29,8 @@ public: explicit CPlotter(QWidget *parent = 0); ~CPlotter(); - QSize minimumSizeHint() const; - QSize sizeHint() const; + QSize minimumSizeHint() const Q_DECL_OVERRIDE; + QSize sizeHint() const Q_DECL_OVERRIDE; void draw(float swide[], bool bScroll, bool bRed); //Update the waterfall void replot(); From 6692b8427d3c76cbafc190bbc6ef0d0672aa632f Mon Sep 17 00:00:00 2001 From: sirhc808 Date: Mon, 1 Jul 2019 21:15:53 -0500 Subject: [PATCH 04/10] break build on C++ warnings --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 897139201..16397a921 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -923,7 +923,7 @@ set (CMAKE_VISIBILITY_INLINES_HIDDEN ON) # set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra") -set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fexceptions -frtti") +set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werrror -Wall -Wextra -fexceptions -frtti") if (NOT APPLE) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pragmas") From 47b8d4422c140df86290e0d7c5a61a307c020302 Mon Sep 17 00:00:00 2001 From: sirhc808 Date: Mon, 1 Jul 2019 21:19:18 -0500 Subject: [PATCH 05/10] fix some errrrrors --- CMakeLists.txt | 2 +- models/DecodeHighlightingModel.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 16397a921..6fe51a4a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -923,7 +923,7 @@ set (CMAKE_VISIBILITY_INLINES_HIDDEN ON) # set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra") -set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werrror -Wall -Wextra -fexceptions -frtti") +set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wextra -fexceptions -frtti") if (NOT APPLE) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-pragmas") diff --git a/models/DecodeHighlightingModel.cpp b/models/DecodeHighlightingModel.cpp index 4a1205eb3..c4e9f7580 100644 --- a/models/DecodeHighlightingModel.cpp +++ b/models/DecodeHighlightingModel.cpp @@ -45,7 +45,7 @@ QList const DecodeHighlightingModel::imp , {Highlight::CallBand, false, {}, {{0x99, 0xff, 0xff}}} , {Highlight::LotW, false, {{0x99, 0x00, 0x00}}, {}} , {Highlight::CQ, true, {}, {{0x66, 0xff, 0x66}}} - , {Highlight::Tx, true, {}, {{Qt::yellow}}} + , {Highlight::Tx, true, {}, {Qt::yellow}} }; bool operator == (DecodeHighlightingModel::HighlightInfo const& lhs, DecodeHighlightingModel::HighlightInfo const& rhs) From c0aada598d8483531180b1cde59e592c46862c6c Mon Sep 17 00:00:00 2001 From: sirhc808 Date: Mon, 1 Jul 2019 21:24:30 -0500 Subject: [PATCH 06/10] add some clion ignorance --- .gitignore | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 5049fa4e9..c5094ea8f 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,6 @@ jnq* *.exe *.o *.mod -*.pro.user \ No newline at end of file +*.pro.user +cmake-build-debug +cmake-build-release From 50ce71b47a8ff009504661b48d8989b8b5b292ac Mon Sep 17 00:00:00 2001 From: sirhc808 Date: Mon, 1 Jul 2019 21:52:32 -0500 Subject: [PATCH 07/10] improve physical structure --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6fe51a4a2..4d4bb593f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -305,7 +305,7 @@ set (wsjtx_CXXSRCS logbook/logbook.cpp psk_reporter.cpp Modulator.cpp - Detector.cpp + Detector/Detector.cpp widgets/logqso.cpp widgets/displaytext.cpp decodedtext.cpp From ee5d5c8ae93cc80154ffc0f2c751eee5ea5559f2 Mon Sep 17 00:00:00 2001 From: sirhc808 Date: Tue, 2 Jul 2019 10:19:43 -0500 Subject: [PATCH 08/10] improve physical structure --- CMakeLists.txt | 34 +++++++++---------- Configuration.cpp | 6 ++-- Configuration.hpp | 2 +- Detector.cpp => Detector/Detector.cpp | 0 Detector.hpp => Detector/Detector.hpp | 0 MetaDataRegistry.cpp | 4 +-- .../MessageClient.cpp | 0 .../MessageClient.hpp | 0 .../MessageServer.cpp | 0 .../MessageServer.hpp | 0 .../NetworkAccessManager.hpp | 0 .../NetworkMessage.cpp | 0 .../NetworkMessage.hpp | 0 .../NetworkServerLookup.cpp | 0 .../NetworkServerLookup.hpp | 0 psk_reporter.cpp => Network/psk_reporter.cpp | 2 +- psk_reporter.h => Network/psk_reporter.h | 0 .../DXLabSuiteCommanderTransceiver.cpp | 2 +- .../DXLabSuiteCommanderTransceiver.hpp | 0 .../EmulateSplitTransceiver.cpp | 0 .../EmulateSplitTransceiver.hpp | 0 .../EqualizationToolsDialog.cpp | 0 .../EqualizationToolsDialog.hpp | 0 .../HRDTransceiver.cpp | 2 +- .../HRDTransceiver.hpp | 0 .../HamlibTransceiver.cpp | 0 .../HamlibTransceiver.hpp | 0 .../OmniRigTransceiver.cpp | 2 +- .../OmniRigTransceiver.hpp | 0 .../PollingTransceiver.cpp | 0 .../PollingTransceiver.hpp | 2 +- .../Transceiver.cpp | 0 .../Transceiver.hpp | 0 .../TransceiverBase.cpp | 0 .../TransceiverBase.hpp | 0 .../TransceiverFactory.cpp | 0 .../TransceiverFactory.hpp | 0 UDPExamples/BeaconsModel.hpp | 2 +- UDPExamples/ClientWidget.hpp | 2 +- UDPExamples/DecodesModel.hpp | 2 +- UDPExamples/MessageAggregatorMainWindow.hpp | 2 +- UDPExamples/UDPDaemon.cpp | 2 +- widgets/mainwindow.cpp | 10 +++--- widgets/mainwindow.h | 6 ++-- 44 files changed, 41 insertions(+), 41 deletions(-) rename Detector.cpp => Detector/Detector.cpp (100%) rename Detector.hpp => Detector/Detector.hpp (100%) rename MessageClient.cpp => Network/MessageClient.cpp (100%) rename MessageClient.hpp => Network/MessageClient.hpp (100%) rename MessageServer.cpp => Network/MessageServer.cpp (100%) rename MessageServer.hpp => Network/MessageServer.hpp (100%) rename NetworkAccessManager.hpp => Network/NetworkAccessManager.hpp (100%) rename NetworkMessage.cpp => Network/NetworkMessage.cpp (100%) rename NetworkMessage.hpp => Network/NetworkMessage.hpp (100%) rename NetworkServerLookup.cpp => Network/NetworkServerLookup.cpp (100%) rename NetworkServerLookup.hpp => Network/NetworkServerLookup.hpp (100%) rename psk_reporter.cpp => Network/psk_reporter.cpp (99%) rename psk_reporter.h => Network/psk_reporter.h (100%) rename DXLabSuiteCommanderTransceiver.cpp => Transceiver/DXLabSuiteCommanderTransceiver.cpp (99%) rename DXLabSuiteCommanderTransceiver.hpp => Transceiver/DXLabSuiteCommanderTransceiver.hpp (100%) rename EmulateSplitTransceiver.cpp => Transceiver/EmulateSplitTransceiver.cpp (100%) rename EmulateSplitTransceiver.hpp => Transceiver/EmulateSplitTransceiver.hpp (100%) rename EqualizationToolsDialog.cpp => Transceiver/EqualizationToolsDialog.cpp (100%) rename EqualizationToolsDialog.hpp => Transceiver/EqualizationToolsDialog.hpp (100%) rename HRDTransceiver.cpp => Transceiver/HRDTransceiver.cpp (99%) rename HRDTransceiver.hpp => Transceiver/HRDTransceiver.hpp (100%) rename HamlibTransceiver.cpp => Transceiver/HamlibTransceiver.cpp (100%) rename HamlibTransceiver.hpp => Transceiver/HamlibTransceiver.hpp (100%) rename OmniRigTransceiver.cpp => Transceiver/OmniRigTransceiver.cpp (99%) rename OmniRigTransceiver.hpp => Transceiver/OmniRigTransceiver.hpp (100%) rename PollingTransceiver.cpp => Transceiver/PollingTransceiver.cpp (100%) rename PollingTransceiver.hpp => Transceiver/PollingTransceiver.hpp (98%) rename Transceiver.cpp => Transceiver/Transceiver.cpp (100%) rename Transceiver.hpp => Transceiver/Transceiver.hpp (100%) rename TransceiverBase.cpp => Transceiver/TransceiverBase.cpp (100%) rename TransceiverBase.hpp => Transceiver/TransceiverBase.hpp (100%) rename TransceiverFactory.cpp => Transceiver/TransceiverFactory.cpp (100%) rename TransceiverFactory.hpp => Transceiver/TransceiverFactory.hpp (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d4bb593f..d4a6e99ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -226,7 +226,7 @@ set (wsjt_qt_CXXSRCS qt_helpers.cpp widgets/MessageBox.cpp MetaDataRegistry.cpp - NetworkServerLookup.cpp + Network/NetworkServerLookup.cpp revision_utils.cpp WFPalette.cpp Radio.cpp @@ -244,16 +244,16 @@ set (wsjt_qt_CXXSRCS GetUserId.cpp TraceFile.cpp AudioDevice.cpp - Transceiver.cpp - TransceiverBase.cpp - EmulateSplitTransceiver.cpp - TransceiverFactory.cpp - PollingTransceiver.cpp - HamlibTransceiver.cpp - HRDTransceiver.cpp - DXLabSuiteCommanderTransceiver.cpp - NetworkMessage.cpp - MessageClient.cpp + Transceiver/Transceiver.cpp + Transceiver/TransceiverBase.cpp + Transceiver/EmulateSplitTransceiver.cpp + Transceiver/TransceiverFactory.cpp + Transceiver/PollingTransceiver.cpp + Transceiver/HamlibTransceiver.cpp + Transceiver/HRDTransceiver.cpp + Transceiver/DXLabSuiteCommanderTransceiver.cpp + Network/NetworkMessage.cpp + Network/MessageClient.cpp widgets/LettersSpinBox.cpp widgets/HintedSpinBox.cpp widgets/RestrictedSpinBox.cpp @@ -268,7 +268,7 @@ set (wsjt_qt_CXXSRCS validators/MaidenheadLocatorValidator.cpp validators/CallsignValidator.cpp widgets/SplashScreen.cpp - EqualizationToolsDialog.cpp + Transceiver/EqualizationToolsDialog.cpp widgets/DoubleClickablePushButton.cpp widgets/DoubleClickableRadioButton.cpp LotWUsers.cpp @@ -303,7 +303,7 @@ set (jt9_CXXSRCS set (wsjtx_CXXSRCS logbook/logbook.cpp - psk_reporter.cpp + Network/psk_reporter.cpp Modulator.cpp Detector/Detector.cpp widgets/logqso.cpp @@ -353,7 +353,7 @@ if (WIN32) set (wsjt_qt_CXXSRCS ${wsjt_qt_CXXSRCS} - OmniRigTransceiver.cpp + Transceiver/OmniRigTransceiver.cpp ) endif (WIN32) @@ -683,13 +683,13 @@ set (wsjtx_UISRCS set (UDP_library_CXXSRCS Radio.cpp RadioMetaType.cpp - NetworkMessage.cpp - MessageServer.cpp + Network/NetworkMessage.cpp + Network/MessageServer.cpp ) set (UDP_library_HEADERS Radio.hpp - MessageServer.hpp + Network/MessageServer.hpp ${PROJECT_BINARY_DIR}/udp_export.h ) diff --git a/Configuration.cpp b/Configuration.cpp index b78739d11..ddaee0ec0 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -172,14 +172,14 @@ #include "item_delegates/ForeignKeyDelegate.hpp" #include "item_delegates/FrequencyDelegate.hpp" #include "item_delegates/FrequencyDeltaDelegate.hpp" -#include "TransceiverFactory.hpp" -#include "Transceiver.hpp" +#include "Transceiver/TransceiverFactory.hpp" +#include "Transceiver/Transceiver.hpp" #include "models/Bands.hpp" #include "models/IARURegions.hpp" #include "models/Modes.hpp" #include "models/FrequencyList.hpp" #include "models/StationList.hpp" -#include "NetworkServerLookup.hpp" +#include "Network/NetworkServerLookup.hpp" #include "widgets/MessageBox.hpp" #include "validators/MaidenheadLocatorValidator.hpp" #include "validators/CallsignValidator.hpp" diff --git a/Configuration.hpp b/Configuration.hpp index 80f5a5cd1..a546e63ba 100644 --- a/Configuration.hpp +++ b/Configuration.hpp @@ -7,7 +7,7 @@ #include "Radio.hpp" #include "models/IARURegions.hpp" #include "AudioDevice.hpp" -#include "Transceiver.hpp" +#include "Transceiver/Transceiver.hpp" #include "pimpl_h.hpp" diff --git a/Detector.cpp b/Detector/Detector.cpp similarity index 100% rename from Detector.cpp rename to Detector/Detector.cpp diff --git a/Detector.hpp b/Detector/Detector.hpp similarity index 100% rename from Detector.hpp rename to Detector/Detector.hpp diff --git a/MetaDataRegistry.cpp b/MetaDataRegistry.cpp index e66a43008..a3a18439d 100644 --- a/MetaDataRegistry.cpp +++ b/MetaDataRegistry.cpp @@ -9,8 +9,8 @@ #include "AudioDevice.hpp" #include "Configuration.hpp" #include "models/StationList.hpp" -#include "Transceiver.hpp" -#include "TransceiverFactory.hpp" +#include "Transceiver/Transceiver.hpp" +#include "Transceiver/TransceiverFactory.hpp" #include "WFPalette.hpp" #include "models/IARURegions.hpp" #include "models/DecodeHighlightingModel.hpp" diff --git a/MessageClient.cpp b/Network/MessageClient.cpp similarity index 100% rename from MessageClient.cpp rename to Network/MessageClient.cpp diff --git a/MessageClient.hpp b/Network/MessageClient.hpp similarity index 100% rename from MessageClient.hpp rename to Network/MessageClient.hpp diff --git a/MessageServer.cpp b/Network/MessageServer.cpp similarity index 100% rename from MessageServer.cpp rename to Network/MessageServer.cpp diff --git a/MessageServer.hpp b/Network/MessageServer.hpp similarity index 100% rename from MessageServer.hpp rename to Network/MessageServer.hpp diff --git a/NetworkAccessManager.hpp b/Network/NetworkAccessManager.hpp similarity index 100% rename from NetworkAccessManager.hpp rename to Network/NetworkAccessManager.hpp diff --git a/NetworkMessage.cpp b/Network/NetworkMessage.cpp similarity index 100% rename from NetworkMessage.cpp rename to Network/NetworkMessage.cpp diff --git a/NetworkMessage.hpp b/Network/NetworkMessage.hpp similarity index 100% rename from NetworkMessage.hpp rename to Network/NetworkMessage.hpp diff --git a/NetworkServerLookup.cpp b/Network/NetworkServerLookup.cpp similarity index 100% rename from NetworkServerLookup.cpp rename to Network/NetworkServerLookup.cpp diff --git a/NetworkServerLookup.hpp b/Network/NetworkServerLookup.hpp similarity index 100% rename from NetworkServerLookup.hpp rename to Network/NetworkServerLookup.hpp diff --git a/psk_reporter.cpp b/Network/psk_reporter.cpp similarity index 99% rename from psk_reporter.cpp rename to Network/psk_reporter.cpp index b68a9c344..e84b5a921 100644 --- a/psk_reporter.cpp +++ b/Network/psk_reporter.cpp @@ -8,7 +8,7 @@ #include #include -#include "MessageClient.hpp" +#include "Network/MessageClient.hpp" #include "moc_psk_reporter.cpp" diff --git a/psk_reporter.h b/Network/psk_reporter.h similarity index 100% rename from psk_reporter.h rename to Network/psk_reporter.h diff --git a/DXLabSuiteCommanderTransceiver.cpp b/Transceiver/DXLabSuiteCommanderTransceiver.cpp similarity index 99% rename from DXLabSuiteCommanderTransceiver.cpp rename to Transceiver/DXLabSuiteCommanderTransceiver.cpp index d745ec17f..333f488ce 100644 --- a/DXLabSuiteCommanderTransceiver.cpp +++ b/Transceiver/DXLabSuiteCommanderTransceiver.cpp @@ -6,7 +6,7 @@ #include #include -#include "NetworkServerLookup.hpp" +#include "Network/NetworkServerLookup.hpp" #include "moc_DXLabSuiteCommanderTransceiver.cpp" diff --git a/DXLabSuiteCommanderTransceiver.hpp b/Transceiver/DXLabSuiteCommanderTransceiver.hpp similarity index 100% rename from DXLabSuiteCommanderTransceiver.hpp rename to Transceiver/DXLabSuiteCommanderTransceiver.hpp diff --git a/EmulateSplitTransceiver.cpp b/Transceiver/EmulateSplitTransceiver.cpp similarity index 100% rename from EmulateSplitTransceiver.cpp rename to Transceiver/EmulateSplitTransceiver.cpp diff --git a/EmulateSplitTransceiver.hpp b/Transceiver/EmulateSplitTransceiver.hpp similarity index 100% rename from EmulateSplitTransceiver.hpp rename to Transceiver/EmulateSplitTransceiver.hpp diff --git a/EqualizationToolsDialog.cpp b/Transceiver/EqualizationToolsDialog.cpp similarity index 100% rename from EqualizationToolsDialog.cpp rename to Transceiver/EqualizationToolsDialog.cpp diff --git a/EqualizationToolsDialog.hpp b/Transceiver/EqualizationToolsDialog.hpp similarity index 100% rename from EqualizationToolsDialog.hpp rename to Transceiver/EqualizationToolsDialog.hpp diff --git a/HRDTransceiver.cpp b/Transceiver/HRDTransceiver.cpp similarity index 99% rename from HRDTransceiver.cpp rename to Transceiver/HRDTransceiver.cpp index 873c87184..e66482084 100644 --- a/HRDTransceiver.cpp +++ b/Transceiver/HRDTransceiver.cpp @@ -8,7 +8,7 @@ #include #include -#include "NetworkServerLookup.hpp" +#include "Network/NetworkServerLookup.hpp" namespace { diff --git a/HRDTransceiver.hpp b/Transceiver/HRDTransceiver.hpp similarity index 100% rename from HRDTransceiver.hpp rename to Transceiver/HRDTransceiver.hpp diff --git a/HamlibTransceiver.cpp b/Transceiver/HamlibTransceiver.cpp similarity index 100% rename from HamlibTransceiver.cpp rename to Transceiver/HamlibTransceiver.cpp diff --git a/HamlibTransceiver.hpp b/Transceiver/HamlibTransceiver.hpp similarity index 100% rename from HamlibTransceiver.hpp rename to Transceiver/HamlibTransceiver.hpp diff --git a/OmniRigTransceiver.cpp b/Transceiver/OmniRigTransceiver.cpp similarity index 99% rename from OmniRigTransceiver.cpp rename to Transceiver/OmniRigTransceiver.cpp index de352fb5a..ff8dc79ec 100644 --- a/OmniRigTransceiver.cpp +++ b/Transceiver/OmniRigTransceiver.cpp @@ -6,7 +6,7 @@ #include #include -#include "qt_helpers.hpP" +#include "qt_helpers.hpp" #include "moc_OmniRigTransceiver.cpp" diff --git a/OmniRigTransceiver.hpp b/Transceiver/OmniRigTransceiver.hpp similarity index 100% rename from OmniRigTransceiver.hpp rename to Transceiver/OmniRigTransceiver.hpp diff --git a/PollingTransceiver.cpp b/Transceiver/PollingTransceiver.cpp similarity index 100% rename from PollingTransceiver.cpp rename to Transceiver/PollingTransceiver.cpp diff --git a/PollingTransceiver.hpp b/Transceiver/PollingTransceiver.hpp similarity index 98% rename from PollingTransceiver.hpp rename to Transceiver/PollingTransceiver.hpp index a9e639f9d..7037c8261 100644 --- a/PollingTransceiver.hpp +++ b/Transceiver/PollingTransceiver.hpp @@ -3,7 +3,7 @@ #include -#include "TransceiverBase.hpp" +#include "Transceiver/TransceiverBase.hpp" class QTimer; diff --git a/Transceiver.cpp b/Transceiver/Transceiver.cpp similarity index 100% rename from Transceiver.cpp rename to Transceiver/Transceiver.cpp diff --git a/Transceiver.hpp b/Transceiver/Transceiver.hpp similarity index 100% rename from Transceiver.hpp rename to Transceiver/Transceiver.hpp diff --git a/TransceiverBase.cpp b/Transceiver/TransceiverBase.cpp similarity index 100% rename from TransceiverBase.cpp rename to Transceiver/TransceiverBase.cpp diff --git a/TransceiverBase.hpp b/Transceiver/TransceiverBase.hpp similarity index 100% rename from TransceiverBase.hpp rename to Transceiver/TransceiverBase.hpp diff --git a/TransceiverFactory.cpp b/Transceiver/TransceiverFactory.cpp similarity index 100% rename from TransceiverFactory.cpp rename to Transceiver/TransceiverFactory.cpp diff --git a/TransceiverFactory.hpp b/Transceiver/TransceiverFactory.hpp similarity index 100% rename from TransceiverFactory.hpp rename to Transceiver/TransceiverFactory.hpp diff --git a/UDPExamples/BeaconsModel.hpp b/UDPExamples/BeaconsModel.hpp index b089349cc..3fc9cb2af 100644 --- a/UDPExamples/BeaconsModel.hpp +++ b/UDPExamples/BeaconsModel.hpp @@ -3,7 +3,7 @@ #include -#include "MessageServer.hpp" +#include "Network/MessageServer.hpp" using Frequency = MessageServer::Frequency; diff --git a/UDPExamples/ClientWidget.hpp b/UDPExamples/ClientWidget.hpp index 22488531c..14dfa4947 100644 --- a/UDPExamples/ClientWidget.hpp +++ b/UDPExamples/ClientWidget.hpp @@ -7,7 +7,7 @@ #include #include -#include "MessageServer.hpp" +#include "Network/MessageServer.hpp" class QAbstractItemModel; class QModelIndex; diff --git a/UDPExamples/DecodesModel.hpp b/UDPExamples/DecodesModel.hpp index 17c9ae125..384de5e0f 100644 --- a/UDPExamples/DecodesModel.hpp +++ b/UDPExamples/DecodesModel.hpp @@ -3,7 +3,7 @@ #include -#include "MessageServer.hpp" +#include "Network/MessageServer.hpp" using Frequency = MessageServer::Frequency; diff --git a/UDPExamples/MessageAggregatorMainWindow.hpp b/UDPExamples/MessageAggregatorMainWindow.hpp index 29f762d3d..cd52ec1eb 100644 --- a/UDPExamples/MessageAggregatorMainWindow.hpp +++ b/UDPExamples/MessageAggregatorMainWindow.hpp @@ -5,7 +5,7 @@ #include #include -#include "MessageServer.hpp" +#include "Network/MessageServer.hpp" class QDateTime; class QStandardItemModel; diff --git a/UDPExamples/UDPDaemon.cpp b/UDPExamples/UDPDaemon.cpp index 20f1995b3..e2849e8b3 100644 --- a/UDPExamples/UDPDaemon.cpp +++ b/UDPExamples/UDPDaemon.cpp @@ -25,7 +25,7 @@ #include #include -#include "MessageServer.hpp" +#include "Network/MessageServer.hpp" #include "Radio.hpp" #include "qt_helpers.hpp" diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index f5c5cff41..a5e734664 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -41,11 +41,11 @@ #include "revision_utils.hpp" #include "qt_helpers.hpp" -#include "NetworkAccessManager.hpp" +#include "Network/NetworkAccessManager.hpp" #include "soundout.h" #include "soundin.h" #include "Modulator.hpp" -#include "Detector.hpp" +#include "Detector/Detector.hpp" #include "plotter.h" #include "echoplot.h" #include "echograph.h" @@ -60,10 +60,10 @@ #include "decodedtext.h" #include "Radio.hpp" #include "models/Bands.hpp" -#include "TransceiverFactory.hpp" +#include "Transceiver/TransceiverFactory.hpp" #include "models/StationList.hpp" #include "validators/LiveFrequencyValidator.hpp" -#include "MessageClient.hpp" +#include "Network/MessageClient.hpp" #include "wsprnet.h" #include "signalmeter.h" #include "HelpTextWindow.hpp" @@ -72,7 +72,7 @@ #include "MultiSettings.hpp" #include "validators/MaidenheadLocatorValidator.hpp" #include "validators/CallsignValidator.hpp" -#include "EqualizationToolsDialog.hpp" +#include "Transceiver/EqualizationToolsDialog.hpp" #include "LotWUsers.hpp" #include "logbook/AD1CCty.hpp" #include "models/FoxLog.hpp" diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index ca545ec35..a89c6c766 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -29,13 +29,13 @@ #include "models/FrequencyList.hpp" #include "Configuration.hpp" #include "WSPRBandHopping.hpp" -#include "Transceiver.hpp" +#include "Transceiver/Transceiver.hpp" #include "DisplayManual.hpp" -#include "psk_reporter.h" +#include "Network/psk_reporter.h" #include "logbook/logbook.h" #include "astro.h" #include "MessageBox.hpp" -#include "NetworkAccessManager.hpp" +#include "Network/NetworkAccessManager.hpp" #define NUM_JT4_SYMBOLS 206 //(72+31)*2, embedded sync #define NUM_JT65_SYMBOLS 126 //63 data + 63 sync From 569809b0b3c759e818aac155d087c97d5689c739 Mon Sep 17 00:00:00 2001 From: sirhc808 Date: Tue, 2 Jul 2019 11:30:53 -0500 Subject: [PATCH 09/10] capture existing implementation in UML --- doc/design/JT9ReceiveDatapath.puml | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 doc/design/JT9ReceiveDatapath.puml diff --git a/doc/design/JT9ReceiveDatapath.puml b/doc/design/JT9ReceiveDatapath.puml new file mode 100644 index 000000000..c6b367b14 --- /dev/null +++ b/doc/design/JT9ReceiveDatapath.puml @@ -0,0 +1,31 @@ +@startuml + +hide footbox + +participant Detector +participant MainWindow +participant SHM +participant jt9.f90 +participant decoder.f90 +participant ft8_decode.f90 + +Detector -> MainWindow : dataSink() + +activate MainWindow +MainWindow -> MainWindow : decode() +MainWindow -> MainWindow : decodeBusy() + +MainWindow -> SHM : memcpy() +MainWindow -> jt9.f90 : doorbell +deactivate MainWindow + +activate jt9.f90 +jt9.f90 -> decoder.f90 : multimode_decoder() + +decoder.f90 -> ft8_decode.f90 : decode() +ft8_decode.f90 -> decoder.f90 : ft8_decoded() +decoder.f90 -> jt9.f90 + +jt9.f90 -> MainWindow : readFromStdout() + +@enduml From af645333631309b11cf2c910b10314f93155517f Mon Sep 17 00:00:00 2001 From: sirhc808 Date: Tue, 2 Jul 2019 11:50:55 -0500 Subject: [PATCH 10/10] start refactoring UML docs --- doc/design/DecoderRefactor.puml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 doc/design/DecoderRefactor.puml diff --git a/doc/design/DecoderRefactor.puml b/doc/design/DecoderRefactor.puml new file mode 100644 index 000000000..910e16758 --- /dev/null +++ b/doc/design/DecoderRefactor.puml @@ -0,0 +1,14 @@ +@startuml + +interface IProtocol { + encode() + decode() +} +interface IDecoder +interface IEncoder +interface IDecode + +class FT8 +IProtocol <|-- FT8 + +@enduml