diff options
| author | Christoph Berg <myon@debian.org> | 2022-09-17 12:51:21 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2022-09-17 12:51:21 +0200 |
| commit | 4d2fac0dafe835b1ed479bebe136c3afe748ecf3 (patch) | |
| tree | efddc4f95ba73f57dcd6518ce31f8e6ea5b0cd15 | |
| parent | 2d1068e60bce7ae1fff11623454900e8cee956b1 (diff) | |
New upstream version 2.6.0~rc4+repackupstream/2.6.0_rc4+repack
| -rwxr-xr-x | CMakeLists.txt | 9 | ||||
| -rwxr-xr-x | NEWS | 22 | ||||
| -rwxr-xr-x | Release_Notes.txt | 22 | ||||
| -rwxr-xr-x | Transceiver/HRDTransceiver.cpp | 4 | ||||
| -rwxr-xr-x | Transceiver/HamlibTransceiver.cpp | 3 | ||||
| -rwxr-xr-x | lib/avecho.f90 | 13 | ||||
| -rwxr-xr-x | lib/decoder.f90 | 12 | ||||
| -rwxr-xr-x | lib/echosim.f90 | 106 | ||||
| -rwxr-xr-x | lib/fspread_lorentz.f90 | 47 | ||||
| -rwxr-xr-x | manpages/man1/wsjtx.1.txt | 2 | ||||
| -rwxr-xr-x | widgets/astro.cpp | 5 | ||||
| -rwxr-xr-x | widgets/echograph.cpp | 23 | ||||
| -rwxr-xr-x | widgets/echograph.h | 3 | ||||
| -rwxr-xr-x | widgets/echograph.ui | 23 | ||||
| -rwxr-xr-x | widgets/echoplot.cpp | 17 | ||||
| -rwxr-xr-x | widgets/echoplot.h | 2 | ||||
| -rwxr-xr-x | widgets/mainwindow.cpp | 69 | ||||
| -rwxr-xr-x | widgets/mainwindow.h | 5 | ||||
| -rwxr-xr-x | widgets/mainwindow.ui | 8 |
19 files changed, 359 insertions, 36 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e25b9854..1b9ef3d3 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,7 +71,7 @@ message (STATUS "******************************************************") include (set_build_type)
# RC 0 or omitted is a development build, GA is a General Availability release build
-set_build_type (RC 3)
+set_build_type (RC 4)
set (wsjtx_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}${BUILD_TYPE_REVISION}")
#
@@ -385,6 +385,7 @@ set (wsjt_FSRCS lib/demod64a.f90
lib/determ.f90
lib/downsam9.f90
+ lib/echosim.f90
lib/echo_snr.f90
lib/encode232.f90
lib/encode4.f90
@@ -419,6 +420,7 @@ set (wsjt_FSRCS lib/fmtmsg.f90
lib/foldspec9f.f90
lib/four2a.f90
+ lib/fspread_lorentz.f90
lib/ft8/foxfilt.f90
lib/ft8/foxgen.f90
lib/ft8/foxgen_wrap.f90
@@ -1184,6 +1186,9 @@ target_link_libraries (ft8code wsjt_fort wsjt_cxx) add_executable (ft4code lib/ft4/ft4code.f90)
target_link_libraries (ft4code wsjt_fort wsjt_cxx)
+add_executable (echosim lib/echosim.f90)
+target_link_libraries (echosim wsjt_fort wsjt_cxx)
+
add_executable (ft8sim lib/ft8/ft8sim.f90)
target_link_libraries (ft8sim wsjt_fort wsjt_cxx)
@@ -1583,7 +1588,7 @@ install (TARGETS jt9 wsprd fmtave fcal fmeasure if(WSJT_BUILD_UTILS)
install (TARGETS ft8code jt65code jt9code jt4code msk144code
- q65code fst4sim q65sim
+ q65code fst4sim q65sim echosim
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime
)
@@ -11,6 +11,28 @@ Copyright 2001 - 2022 by Joe Taylor, K1JT, and the WSJT Development Team
+ Release: WSJT-X 2.6.0-rc4
+ September 8, 2022
+ -------------------------
+
+WSJT-X 2.6.0 Release Candidate 4 provides further improvements to Echo mode, a new File menu item, and several bug fixes.
+
+ - New features and fixes for Echo mode
+ - Created a new simulator echosim[.exe]
+ - Improved organization of output to text window
+ - Gain and Zero controls in Echo Graph now behave independently
+ - "Clear Avg" now erases the plot in Echo Graph
+ - Optional baseline for plots in Echo Graph
+
+ - New menu item "File | Copy main text window to WSJT-X.txt"
+ - Doppler tracking checkbox is made sticky
+
+ - Fix an RC2 bug that prevented normal use of JT9.
+ - Fix a rarely experienced failure when writing to decoded.txt
+ - Fix a hamlib bug caused by setting VFO B when Split is not used
+ - Rig control interface to Ham Radio deluxe made more robust
+
+
Release: WSJT-X 2.6.0-rc3
August 22, 2022
----------------------
diff --git a/Release_Notes.txt b/Release_Notes.txt index 2478d3df..effe6249 100755 --- a/Release_Notes.txt +++ b/Release_Notes.txt @@ -11,6 +11,28 @@ Copyright 2001 - 2022 by Joe Taylor, K1JT, and the WSJT Development Team
+ Release: WSJT-X 2.6.0-rc4
+ September 8, 2022
+ -------------------------
+
+WSJT-X 2.6.0 Release Candidate 4 provides further improvements to Echo mode, a new File menu item, and several bug fixes.
+
+ - New features and fixes for Echo mode
+ - Created a new simulator echosim[.exe]
+ - Improved organization of output to text window
+ - Gain and Zero controls in Echo Graph now behave independently
+ - "Clear Avg" now erases the plot in Echo Graph
+ - Optional baseline for plots in Echo Graph
+
+ - New menu item "File | Copy main text window to WSJT-X.txt"
+ - Doppler tracking checkbox is made sticky
+
+ - Fix an RC2 bug that prevented normal use of JT9.
+ - Fix a rarely experienced failure when writing to decoded.txt
+ - Fix a hamlib bug caused by setting VFO B when Split is not used
+ - Rig control interface to Ham Radio deluxe made more robust
+
+
Release: WSJT-X 2.6.0-rc3
August 22, 2022
----------------------
diff --git a/Transceiver/HRDTransceiver.cpp b/Transceiver/HRDTransceiver.cpp index d81aca5f..f7ed97da 100755 --- a/Transceiver/HRDTransceiver.cpp +++ b/Transceiver/HRDTransceiver.cpp @@ -18,7 +18,7 @@ namespace // some commands require a settling time, particularly "RX A" and
// "RX B" on the Yaesu FTdx3000.
- int constexpr yaesu_delay {250};
+ int constexpr yaesu_delay {350};
}
#include "moc_HRDTransceiver.cpp"
@@ -1124,7 +1124,7 @@ QByteArray HRDTransceiver::read_reply (QString const& cmd) {
// waitForReadReady appears to be occasionally unreliable on Windows
// timing out when data is waiting so retry a few times
- unsigned retries {3};
+ unsigned retries {30};
bool replied {false};
while (!replied && retries--)
{
diff --git a/Transceiver/HamlibTransceiver.cpp b/Transceiver/HamlibTransceiver.cpp index c5390390..08da6d3b 100755 --- a/Transceiver/HamlibTransceiver.cpp +++ b/Transceiver/HamlibTransceiver.cpp @@ -911,7 +911,8 @@ void HamlibTransceiver::do_frequency (Frequency f, MODE m, bool no_ignore) // to frequency such as the TS-2000 auto mode setting
CAT_TRACE ("rig_set_mode mode=" << rig_strrmode (new_mode));
m_->error_check (rig_set_mode (m_->rig_.data (), target_vfo, new_mode, RIG_PASSBAND_NOCHANGE), tr ("setting current VFO mode"));
- rig_set_mode (m_->rig_.data (), RIG_VFO_B, new_mode, RIG_PASSBAND_NOCHANGE), tr ("setting VFOB mode");
+ // set mode on VFOB too if we are in split
+ if (state ().split()) rig_set_mode (m_->rig_.data (), RIG_VFO_B, new_mode, RIG_PASSBAND_NOCHANGE), tr ("setting VFOB mode");
}
update_mode (m);
}
diff --git a/lib/avecho.f90 b/lib/avecho.f90 index fc55d74f..4b078f71 100755 --- a/lib/avecho.f90 +++ b/lib/avecho.f90 @@ -31,7 +31,7 @@ subroutine avecho(id2,ndop,nfrit,nauto,nqual,f1,xlevel,snrdb,db_err, & read(39,*) fspread
close(39)
endif
- fspread=min(max(0.1,fspread),700.0)
+ fspread=min(max(0.04,fspread),700.0)
width=fspread
dop=ndop
sq=0.
@@ -87,8 +87,13 @@ subroutine avecho(id2,ndop,nfrit,nauto,nqual,f1,xlevel,snrdb,db_err, & call smo121(blue,NZ)
enddo
-! write(*,3001) snrdb,db_err,dfreq,snr_detect,redmax,nqual,nsmo,nclearave,nsum
-!3001 format('A',5f10.1,4i4)
+ ia=200.0/df
+ ib=400.0/df
+ call pctile(red(ia:ib),ib-ia+1,50,bred)
+ red=red-bred
+ call pctile(blue(ia:ib),ib-ia+1,50,bblue)
+ blue=blue-bblue
-900 return
+900 call sleep_msec(10) !Avoid the "blue Decode button" syndrome
+ return
end subroutine avecho
diff --git a/lib/decoder.f90 b/lib/decoder.f90 index 1c1d4e48..baf3ddbf 100755 --- a/lib/decoder.f90 +++ b/lib/decoder.f90 @@ -687,12 +687,14 @@ contains write(*,1001) params%nutc,snr,dt,nint(freq),decoded0,annot
1001 format(i6.6,i4,f5.1,i5,' + ',1x,a37,1x,a2)
- if(ios13.eq.0) write(13,1002) params%nutc,nint(sync),snr,dt, &
- freq,0,decoded0
-1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a37,' FT4')
+
+ if(ios13.eq.0) then
+ write(13,1002,err=10) params%nutc,nint(sync),snr,dt,freq,0,decoded0
+1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a37,' FT4')
+ flush(13)
+ endif
- call flush(6)
- if(ios13.eq.0) call flush(13)
+10 call flush(6)
select type(this)
type is (counting_ft4_decoder)
diff --git a/lib/echosim.f90 b/lib/echosim.f90 new file mode 100755 index 00000000..eeac4bd8 --- /dev/null +++ b/lib/echosim.f90 @@ -0,0 +1,106 @@ +program echosim
+
+! Generate simulated echo-mode files -- self-echo or "measure"
+
+ use wavhdr
+ parameter (NWAVE=27648,NMAX=32768,NZ=36000)
+ type(hdr) h !Header for .wav file
+ character arg*12,fname*17
+ complex c0(0:NMAX-1)
+ complex c(0:NMAX-1)
+! complex cwave(0:NWAVE-1)
+ real*8 f0,dt,twopi,phi,dphi
+ real wave(NZ)
+ integer*2 iwave(NZ) !Generated full-length waveform
+ equivalence (nDop0,iwave(1))
+ equivalence (nDopAudio0,iwave(3))
+ equivalence (nfrit0,iwave(5))
+ equivalence (f10,iwave(7))
+ equivalence (fspread0,iwave(9))
+
+! Get command-line argument(s)
+ nargs=iargc()
+ if(nargs.ne.5) then
+ print*,'Usage: echosim f0 fdop fspread nfiles snr'
+ print*,'Examples: echosim 1500 0.0 4.0 10 -22'
+ go to 999
+ endif
+
+ call getarg(1,arg)
+ read(arg,*) f0 !Tone frequency
+ call getarg(2,arg)
+ read(arg,*) fdop !Doppler shift (Hz)
+ call getarg(3,arg)
+ read(arg,*) fspread !Frequency spread (Hz) (JHT Lorentzian model)
+ call getarg(4,arg)
+ read(arg,*) nfiles !Number of files
+ call getarg(5,arg)
+ read(arg,*) snrdb !SNR_2500
+
+ twopi=8.d0*atan(1.d0)
+ fs=12000.0 !Sample rate (Hz)
+ dt=1.d0/fs !Sample interval (s)
+ bandwidth_ratio=2500.0/(fs/2.0)
+ sig=sqrt(2*bandwidth_ratio) * 10.0**(0.05*snrdb)
+ if(snrdb.gt.90.0) sig=1.0
+ dphi=twopi*(f0+fdop)*dt
+
+ write(*,1000)
+1000 format(' N f0 fDop fSpread SNR File name'/51('-'))
+
+ do ifile=1,nfiles
+ phi=0.d0
+ do i=0,NWAVE-1
+ phi=phi + dphi
+ if(phi.gt.twopi) phi=phi-twopi
+ xphi=phi
+ c0(i)=cmplx(cos(xphi),sin(xphi))
+ enddo
+ c0(NWAVE:)=0.
+ if(fspread.gt.0.0) call fspread_lorentz(c0,fspread)
+ c=sig*c0
+ wave(1:NWAVE)=imag(c(1:NWAVE))
+ peak=maxval(abs(wave))
+ if(snrdb.lt.90) then
+ do i=1,NWAVE !Add gaussian noise at specified SNR
+ xnoise=gran()
+ wave(i)=wave(i) + xnoise
+ enddo
+ do i=NWAVE+1,NZ
+ xnoise=gran()
+ wave(i)=xnoise
+ enddo
+ endif
+
+ gain=100.0
+ if(snrdb.lt.90.0) then
+ wave=gain*wave
+ else
+ datpk=maxval(abs(wave))
+ fac=32766.9/datpk
+ wave=fac*wave
+ endif
+ if(any(abs(wave).gt.32767.0)) print*,"Warning - data will be clipped."
+ iwave=nint(wave)
+
+ nDop0=nint(fdop)
+ nDopAudio0=0
+ nfrit0=0
+ f10=f0 + fdop
+ fspread0=fspread
+
+ h=default_header(12000,NMAX)
+ n=3*(ifile-1)
+ ihr=n/3600
+ imin=(n-3600*ihr)/60
+ isec=mod(n,60)
+ write(fname,1102) ihr,imin,isec
+1102 format('000000_',3i2.2,'.wav')
+ open(10,file=fname,status='unknown',access='stream')
+ write(10) h,iwave !Save to *.wav file
+ close(10)
+ write(*,1110) ifile,f0,fdop,fspread,snrdb,fname
+1110 format(i4,4f7.1,2x,a17)
+ enddo
+
+999 end program echosim
diff --git a/lib/fspread_lorentz.f90 b/lib/fspread_lorentz.f90 new file mode 100755 index 00000000..e0493932 --- /dev/null +++ b/lib/fspread_lorentz.f90 @@ -0,0 +1,47 @@ +subroutine fspread_lorentz(cdat,fspread)
+
+ parameter (NZ=3*12000)
+ complex cdat(0:NZ-1)
+ complex cspread(0:NZ-1)
+ complex z
+
+ twopi=8.0*atan(1.0)
+ nfft=NZ
+ nh=nfft/2
+ df=12000.0/nfft
+ cspread(0)=1.0
+ cspread(nh)=0.
+ b=6.0 !Use truncated Lorenzian shape for fspread
+ do i=1,nh
+ f=i*df
+ x=b*f/fspread
+ z=0.
+ a=0.
+ if(x.lt.3.0) then !Cutoff beyond x=3
+ a=sqrt(1.111/(1.0+x*x)-0.1) !Lorentzian amplitude
+ phi1=twopi*rran() !Random phase
+ z=a*cmplx(cos(phi1),sin(phi1))
+ endif
+ cspread(i)=z
+ z=0.
+ if(x.lt.3.0) then !Same thing for negative freqs
+ phi2=twopi*rran()
+ z=a*cmplx(cos(phi2),sin(phi2))
+ endif
+ cspread(nfft-i)=z
+ enddo
+
+ call four2a(cspread,nfft,1,1,1) !Transform to time domain
+
+ sum=0.
+ do i=0,nfft-1
+ p=real(cspread(i))**2 + aimag(cspread(i))**2
+ sum=sum+p
+ enddo
+ avep=sum/nfft
+ fac=sqrt(1.0/avep)
+ cspread=fac*cspread !Normalize to constant avg power
+ cdat=cspread*cdat !Apply Rayleigh fading
+
+ return
+end subroutine fspread_lorentz
diff --git a/manpages/man1/wsjtx.1.txt b/manpages/man1/wsjtx.1.txt index ec5eb1c7..fc4269c1 100755 --- a/manpages/man1/wsjtx.1.txt +++ b/manpages/man1/wsjtx.1.txt @@ -75,7 +75,7 @@ applications settings dialog. ~/.local/share/WSJT-X[ - RIGNAME]/save/samples/::
-Sample .WAV files suppied with the application are found in this
+Sample .WAV files supplied with the application are found in this
directory, they may be played back in the application and are referred
to in the user guide tutorial sections.
diff --git a/widgets/astro.cpp b/widgets/astro.cpp index 05e830c2..a090a519 100755 --- a/widgets/astro.cpp +++ b/widgets/astro.cpp @@ -55,7 +55,6 @@ Astro::Astro(QSettings * settings, Configuration const * configuration, QWidget Astro::~Astro ()
{
- ui_->cbDopplerTracking->setChecked (false);
Q_EMIT tracking_update ();
if (isVisible ()) write_settings ();
}
@@ -69,6 +68,8 @@ void Astro::closeEvent (QCloseEvent * e) void Astro::read_settings ()
{
SettingsGroup g (settings_, "Astro");
+ bool b=settings_->value("DopplerTracking",false).toBool();
+ ui_->cbDopplerTracking->setChecked(b);
ui_->doppler_widget->setVisible (ui_->cbDopplerTracking->isChecked ());
m_DopplerMethod=settings_->value("DopplerMethod",0).toInt();
switch (m_DopplerMethod)
@@ -86,7 +87,7 @@ void Astro::read_settings () void Astro::write_settings ()
{
SettingsGroup g (settings_, "Astro");
- //settings_->setValue ("DopplerTracking", ui_->cbDopplerTracking->isChecked ());
+ settings_->setValue ("DopplerTracking", ui_->cbDopplerTracking->isChecked());
settings_->setValue ("DopplerMethod",m_DopplerMethod);
settings_->setValue ("window/pos", pos ());
}
diff --git a/widgets/echograph.cpp b/widgets/echograph.cpp index 0f6e9232..4f51fa10 100755 --- a/widgets/echograph.cpp +++ b/widgets/echograph.cpp @@ -2,6 +2,7 @@ #include "commons.h"
#include <QSettings>
#include <QApplication>
+#include <QDebug>
#include "echoplot.h"
#include "ui_echograph.h"
#include "moc_echograph.cpp"
@@ -36,6 +37,7 @@ EchoGraph::EchoGraph(QSettings * settings, QWidget *parent) : ui->binsPerPixelSpinBox->setValue(n);
ui->echoPlot->m_blue=m_settings->value("BlueCurve",false).toBool();
m_nColor=m_settings->value("EchoColors",0).toInt();
+ ui->cbBaseline->setChecked(m_settings->value("Baseline",false).toBool());
m_settings->endGroup();
ui->echoPlot->setColors(m_nColor);
}
@@ -62,6 +64,7 @@ void EchoGraph::saveSettings() m_settings->setValue("EchoBPP",ui->echoPlot->m_binsPerPixel);
m_settings->setValue("BlueCurve",ui->echoPlot->m_blue);
m_settings->setValue("EchoColors",m_nColor);
+ m_settings->setValue("Baseline",ui->cbBaseline->isChecked());
m_settings->endGroup();
}
@@ -101,3 +104,23 @@ void EchoGraph::on_pbColors_clicked() m_nColor = (m_nColor+1) % 6;
ui->echoPlot->setColors(m_nColor);
}
+
+void EchoGraph::on_cbBaseline_toggled(bool b)
+{
+ ui->echoPlot->setBaseline(b);
+}
+
+bool EchoGraph::baseline()
+{
+ return ui->cbBaseline->isChecked();
+}
+
+void EchoGraph::clearAvg()
+{
+ for(int i=0; i<4096; i++) {
+ echocom_.blue[i]=0;
+ echocom_.red[i]=0;
+ }
+ echocom_.nsum=0;
+ plotSpec();
+}
diff --git a/widgets/echograph.h b/widgets/echograph.h index cf5caa23..ce6f4b82 100755 --- a/widgets/echograph.h +++ b/widgets/echograph.h @@ -23,6 +23,8 @@ public: void plotSpec();
void saveSettings();
+ void clearAvg();
+ bool baseline();
private slots:
void on_smoothSpinBox_valueChanged(int n);
@@ -30,6 +32,7 @@ private slots: void on_zeroSlider_valueChanged(int value);
void on_binsPerPixelSpinBox_valueChanged(int n);
void on_pbColors_clicked();
+ void on_cbBaseline_toggled(bool b);
private:
QSettings * m_settings;
diff --git a/widgets/echograph.ui b/widgets/echograph.ui index 7def91bd..d9f79bae 100755 --- a/widgets/echograph.ui +++ b/widgets/echograph.ui @@ -190,6 +190,29 @@ </spacer>
</item>
<item>
+ <widget class="QCheckBox" name="cbBaseline">
+ <property name="text">
+ <string>Baseline</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_4">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Preferred</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
<widget class="QSpinBox" name="smoothSpinBox">
<property name="minimumSize">
<size>
diff --git a/widgets/echoplot.cpp b/widgets/echoplot.cpp index 15c2d8e5..80202c35 100755 --- a/widgets/echoplot.cpp +++ b/widgets/echoplot.cpp @@ -127,7 +127,7 @@ void EPlotter::draw() //draw() painter2D.setPen(penBlue);
j=0;
for(i=0; i<m_w; i++) {
- y = 0.9*m_h2 - gain*(m_h/10.0)*(blue[i0+i]-1.0) - 0.01*m_h2*m_plotZero;
+ y = 0.9*m_h2 - gain*(m_h/10.0)*blue[i0+i] - 0.01*m_h2*m_plotZero;
LineBuf[j].setX(i);
LineBuf[j].setY(y);
j++;
@@ -145,12 +145,19 @@ void EPlotter::draw() //draw() j=0;
for(int i=0; i<m_w; i++) {
- y = 0.9*m_h2 - gain*(m_h/10.0)*(red[i0+i]-1.0) - 0.01*m_h2*m_plotZero;
+ y = 0.9*m_h2 - gain*(m_h/10.0)*red[i0+i] - 0.01*m_h2*m_plotZero;
LineBuf[j].setX(i);
LineBuf[j].setY(y);
j++;
}
painter2D.drawPolyline(LineBuf,j);
+
+ if(m_bBaseline) {
+ // Draw the baseline
+ y = 0.9*m_h2 - 0.01*m_h2*m_plotZero;
+ painter2D.drawLine(0,y,m_w,y);
+ }
+
update(); //trigger a new paintEvent
}
@@ -323,3 +330,9 @@ void EPlotter::setColors(qint32 n) //setSmooth() int EPlotter::plotWidth(){return m_2DPixmap.width();}
void EPlotter::UpdateOverlay() {DrawOverlay();}
+
+void EPlotter::setBaseline(bool b)
+{
+ m_bBaseline=b;
+ draw();
+}
diff --git a/widgets/echoplot.h b/widgets/echoplot.h index 8426252e..e23adfee 100755 --- a/widgets/echoplot.h +++ b/widgets/echoplot.h @@ -36,6 +36,7 @@ public: qint32 m_binsPerPixel;
qint32 m_nColor;
bool m_blue;
+ bool m_bBaseline;
void draw(); //Update the Echo plot
void SetRunningState(bool running);
@@ -49,6 +50,7 @@ public: void setSmooth(int n);
int getSmooth();
void setColors(qint32 n);
+ void setBaseline(bool b);
// void SetPercent2DScreen(int percent){m_Percent2DScreen=percent;}
diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 643d7e86..de0b2cee 100755 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -1061,9 +1061,9 @@ void MainWindow::not_GA_warning_message () MessageBox::critical_message (this,
"This is a pre-release version of WSJT-X 2.6.0 made\n"
"available for testing purposes. By design it will\n"
- "be nonfunctional after Nov 30, 2022.");
+ "be nonfunctional after Dec 31, 2022.");
auto now = QDateTime::currentDateTimeUtc ();
- if (now >= QDateTime {{2022, 11, 30}, {23, 59, 59, 999}, Qt::UTC}) {
+ if (now >= QDateTime {{2022, 12, 31}, {23, 59, 59, 999}, Qt::UTC}) {
Q_EMIT finished ();
}
}
@@ -1617,32 +1617,43 @@ void MainWindow::dataSink(qint64 frames) monitor(false);
m_bEchoTxed=false;
}
+
if(m_monitoring or m_auto or m_diskData) {
- QString t;
- t = t.asprintf("%3d %7.1f %7.1f %7.1f %7.1f %7d %7.1f %3d",echocom_.nsum,xlevel,sigdb,
- dBerr,dfreq,nDopTotal,width,nqual);
QString t0;
if(m_diskData) {
t0=t0.asprintf("%06d ",m_UTCdisk);
} else {
- t0=QDateTime::currentDateTimeUtc().toString("hhmmss ");
+ QDateTime now=QDateTime::currentDateTimeUtc();
+ int ihr=now.toString("hh").toInt();
+ int imin=now.toString("mm").toInt();
+ int isec=now.toString("ss").toInt();
+ if(m_auto) isec=isec - isec%6;
+ if(!m_auto) isec=isec - isec%3;
+ t0=t0.asprintf("%02d%02d%02d ",ihr,imin,isec);
}
+ int n=t0.toInt();
+ int nsec=((n/10000)*3600) + (((n/100)%100)*60) + (n%100);
+ if(!m_echoRunning) m_echoSec0=nsec;
+ n=(nsec-m_echoSec0 + 864000)%86400;
+ m_echoRunning=true;
+ QString t;
+ t = t.asprintf("%6d %5.2f %7d %7.1f %7d %7d %7d %7.1f %7.1f",n,xlevel,
+ nDopTotal,width,echocom_.nsum,nqual,qRound(dfreq),sigdb,dBerr);
t = t0 + t;
if (ui) ui->decodedTextBrowser->appendText(t);
}
+
if(m_echoGraph->isVisible()) m_echoGraph->plotSpec();
- if(m_saveAll) {
+ if(m_saveAll and !m_diskData) {
int idir=1;
save_echo_params_(&m_fDop,&nDop,&nfrit,&f1,&width,dec_data.d2,&idir);
m_fSpread=width;
}
m_nclearave=0;
-
}
- if(m_mode=="FreqCal") {
- return;
- }
- if( m_dialFreqRxWSPR==0) m_dialFreqRxWSPR=m_freqNominal;
+ if(m_mode=="FreqCal") return;
+
+ if(m_dialFreqRxWSPR==0) m_dialFreqRxWSPR=m_freqNominal;
m_dataAvailable=true;
dec_data.params.npts8=(m_ihsym*m_nsps)/16;
dec_data.params.newdat=1;
@@ -1687,6 +1698,7 @@ void MainWindow::dataSink(qint64 frames) if (err!=0) MessageBox::warning_message (this, tr ("Error saving c2 file"), c2name);
}
}
+
if(m_mode=="WSPR") {
QStringList t2;
QStringList depth_args;
@@ -1710,6 +1722,7 @@ void MainWindow::dataSink(qint64 frames) m_decoderBusy = true;
statusUpdate ();
}
+
m_rxDone=true;
}
}
@@ -2011,6 +2024,7 @@ void MainWindow::on_monitorButton_clicked (bool checked) } else {
ui->monitorButton->setChecked (false); // disallow
}
+ if(m_mode=="Echo") m_echoRunning=false;
}
void MainWindow::monitor (bool state)
@@ -2048,6 +2062,7 @@ void MainWindow::on_autoButton_clicked (bool checked) echocom_.nsum=0;
}
m_tAutoOn=QDateTime::currentMSecsSinceEpoch()/1000;
+ if(m_mode=="Echo") m_echoRunning=false;
}
void MainWindow::on_sbTxPercent_valueChanged (int n)
@@ -3150,6 +3165,7 @@ void MainWindow::on_ClrAvgButton_clicked() m_nclearave=1;
if(m_mode=="Echo") {
echocom_.nsum=0;
+ m_echoGraph->clearAvg();
} else {
if(m_msgAvgWidget != NULL) {
if(m_msgAvgWidget->isVisible()) m_msgAvgWidget->displayAvg("");
@@ -4704,6 +4720,7 @@ void MainWindow::guiUpdate() ui->txb1->setEnabled(true);
}
}
+ if(m_mode=="Echo" and !m_monitoring and !m_auto and !m_diskData) m_echoRunning=false;
//Once per second (onesec)
if(nsec != m_sec0) {
@@ -6801,7 +6818,6 @@ void MainWindow::on_actionJT4_triggered() void MainWindow::on_actionJT9_triggered()
{
- QTimer::singleShot (50, [=] {on_sbSubmode_valueChanged(ui->sbSubmode->value());});
m_mode="JT9";
bool bVHF=m_config.enable_VHF_features();
m_bFast9=ui->cbFast9->isChecked();
@@ -7105,7 +7121,7 @@ void MainWindow::on_actionEcho_triggered() m_bFastMode=false;
m_bFast9=false;
WSPR_config(true);
- ui->lh_decodes_headings_label->setText(" UTC N Level SNR dBerr DF Doppler Width Q");
+ ui->lh_decodes_headings_label->setText(" UTC Tsec Level Doppler Width N Q DF SNR dBerr");
// 01234567890123456789012345678901234567
displayWidgets(nWidgets("00000000000000000010001000000000000000"));
fast_config(false);
@@ -7689,7 +7705,7 @@ void MainWindow::handle_transceiver_update (Transceiver::TransceiverState const& if (old_state.online () == false && s.online () == true)
{
// initializing
- on_monitorButton_clicked (!m_config.monitor_off_at_startup ());
+ on_monitorButton_clicked (!(m_config.monitor_off_at_startup() or m_mode=="Echo"));
}
if (s.frequency () != old_state.frequency () || s.split () != m_splitMode)
{
@@ -9999,3 +10015,26 @@ void MainWindow::on_jt65Button_clicked() }
on_actionJT65_triggered();
}
+
+void MainWindow::on_actionCopy_to_WSJTX_txt_triggered()
+{
+ static QFile f {QDir {QStandardPaths::writableLocation (QStandardPaths::DataLocation)}.absoluteFilePath ("WSJT-X.txt")};
+ if(!f.open(QIODevice::Text | QIODevice::WriteOnly)) {
+ MessageBox::warning_message (this, tr ("WSJT-X.txt file error"),
+ tr ("Cannot open \"%1\" for writing").arg (f.fileName ()),
+ tr ("Error: %1").arg (f.errorString ()));
+ } else {
+ QString t=ui->decodedTextBrowser->toPlainText();
+
+ QTextStream out(&f);
+ out << t <<
+#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0)
+ endl
+#else
+ Qt::endl
+#endif
+ ;
+ f.close();
+ }
+}
+
diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index f87c031b..62c4008e 100755 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -173,6 +173,7 @@ private slots: void on_actionOpen_next_in_directory_triggered();
void on_actionDecode_remaining_files_in_directory_triggered();
void on_actionDelete_all_wav_files_in_SaveDir_triggered();
+ void on_actionCopy_to_WSJTX_txt_triggered();
void on_actionOpen_log_directory_triggered ();
void on_actionNone_triggered();
void on_actionSave_all_triggered();
@@ -506,6 +507,7 @@ private: qint32 m_points=-99;
qint32 m_score=0;
qint32 m_fDop=0;
+ qint32 m_echoSec0=0;
bool m_btxok; //True if OK to transmit
bool m_diskData;
@@ -735,7 +737,8 @@ private: QThread::Priority m_audioThreadPriority;
bool m_bandEdited;
bool m_splitMode;
- bool m_monitoring;
+ bool m_monitoring=false;
+ bool m_echoRunning=false;
bool m_tx_when_ready;
bool m_transmitting;
bool m_tune;
diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index 3068bd73..b7760141 100755 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -3026,6 +3026,8 @@ QLabel[oob="true"] { <addaction name="actionOpen_next_in_directory"/>
<addaction name="actionDecode_remaining_files_in_directory"/>
<addaction name="separator"/>
+ <addaction name="actionCopy_to_WSJTX_txt"/>
+ <addaction name="separator"/>
<addaction name="actionDelete_all_wav_files_in_SaveDir"/>
<addaction name="actionErase_ALL_TXT"/>
<addaction name="actionErase_wsjtx_log_adi"/>
@@ -3036,7 +3038,6 @@ QLabel[oob="true"] { <addaction name="separator"/>
<addaction name="actionSettings"/>
<addaction name="separator"/>
- <addaction name="separator"/>
<addaction name="actionExit"/>
</widget>
<widget class="QMenu" name="menuView">
@@ -3669,6 +3670,11 @@ QLabel[oob="true"] { <string>Active Stations</string>
</property>
</action>
+ <action name="actionCopy_to_WSJTX_txt">
+ <property name="text">
+ <string>Copy main text window to WSJT-X.txt</string>
+ </property>
+ </action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>
|
