Many improvements to GUI. Fixed the "yellow waterfall" problem; fixed

generated names for *.wav files.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2694 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2012-10-26 16:01:57 +00:00
parent a9342212e8
commit d31bacfab8
5 changed files with 24 additions and 22 deletions

View File

@ -137,11 +137,17 @@ subroutine symspec(k,ntrperiod,nsps,nb,nbslider,pxdb,s,red, &
! call pctile(s,iz,50,xmed0)
ave0=sum(s(1:iz))/iz
s(1:iz)=s(1:iz)/ave0
fac0=1.0/max(ave0,0.006)
s(1:iz)=fac0*s(1:iz)
! call pctile(ssum,iz,50,xmed1)
ave1=sum(ssum(1:iz))/iz
savg(1:iz)=ssum(1:iz)/ave1
fac1=1.0/max(ave1,0.006*ihsym)
savg(1:iz)=fac1*ssum(1:iz)
call redsync(ss,ntrperiod,ihsym,iz,red)
! write(77,3001) ihsym,ave0,xmed0,ave1,xmed1
!3001 format(i5,4f15.3)
! call flush(77)
return
end subroutine symspec

View File

@ -375,8 +375,12 @@ void MainWindow::dataSink(int k)
m_dateTime=t.toString("yyyy-MMM-dd hh:mm");
decode(); //Start the decoder
if(m_saveAll and !m_diskData) {
int ihr=t.time().toString("hh").toInt();
int imin=t.time().toString("mm").toInt();
imin=imin - (imin%(m_TRperiod/60));
QString t2=QString::number(100*ihr + imin);
QString fname=m_saveDir + "/" + t.date().toString("yyMMdd") + "_" +
t.time().toString("hhmm") + ".wav";
t2 + ".wav";
*future2 = QtConcurrent::run(savewav, fname, m_TRperiod);
watcher2->setFuture(*future2);
}
@ -725,7 +729,7 @@ void MainWindow::diskDat() //diskDat()
void MainWindow::diskWriteFinished() //diskWriteFinished
{
qDebug() << "diskWriteFinished";
// qDebug() << "diskWriteFinished";
}
void MainWindow::decoderFinished() //decoderFinished
@ -880,6 +884,11 @@ void MainWindow::guiUpdate()
bool bTxTime = t2p >= tx1 && t2p < tx2;
if(m_auto) {
QFile f("txboth");
if(f.exists() and fmod(tsec,m_TRperiod)<1.0 + 85.0*m_nsps/12000.0)
bTxTime=true;
if(bTxTime and iptt==0 and !m_txMute) {
int itx=1;
int ierr = ptt_(&m_pttPort,&itx,&iptt); // Raise PTT
@ -894,7 +903,6 @@ void MainWindow::guiUpdate()
double snr=t.mid(1,5).toDouble();
if(snr>0.0 or snr < -50.0) snr=99.0;
soundOutThread.setTxSNR(snr);
qDebug() << t << snr;
soundOutThread.start(QThread::HighPriority);
}
}
@ -982,6 +990,7 @@ void MainWindow::guiUpdate()
}
if(nsec != m_sec0) { //Once per second
QDateTime t = QDateTime::currentDateTimeUtc();
if(m_transmitting) {
if(nsendingsh==1) {
lab1->setStyleSheet("QLabel{background-color: #66ffff}");
@ -1001,7 +1010,6 @@ void MainWindow::guiUpdate()
lab1->setText("");
}
QDateTime t = QDateTime::currentDateTimeUtc();
m_setftx=0;
QString utc = " " + t.time().toString() + " ";
ui->labUTC->setText(utc);

View File

@ -208,6 +208,7 @@ void CPlotter::DrawOverlay() //DrawOverlay()
painter.drawLine(0, y, w, y);
}
/*
//draw amplitude values
painter.setPen(Qt::yellow);
// Font.setWeight(QFont::Light);
@ -220,15 +221,6 @@ void CPlotter::DrawOverlay() //DrawOverlay()
painter.drawStaticText(5, y-1, QString::number(dB)+" dB");
dB -= m_dBStepSize;
}
/*
if(!m_Running)
{ //if not running so is no data updates to draw to screen
//copy into 2Dbitmap the overlay bitmap.
m_2DPixmap = m_OverlayPixmap.copy(0,0,m_w,m_h2);
//trigger a new paintEvent
update();
}
*/
QRect rect0;

View File

@ -89,7 +89,6 @@ void WideGraph::dataSink2(float s[], float red[], float df3, int ihsym,
int nbpp = ui->widePlot->binsPerPixel();
static int n=0;
static int nkhz0=-999;
static int ntr0=0;
// df = 12000.0/m_nsps;
@ -134,16 +133,12 @@ void WideGraph::dataSink2(float s[], float red[], float df3, int ihsym,
// Time according to this computer
qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000;
int ntr = (ms/1000) % m_TRperiod;
if((ndiskdata && ihsym <= m_waterfallAvg) || (!ndiskdata && ntr<ntr0)) {
if((ndiskdata && ihsym <= m_waterfallAvg) || (!ndiskdata && ntr<m_ntr0)) {
for (int i=0; i<2048; i++) {
swide[i] = 1.e30;
}
for (int i=0; i<32768; i++) {
splot[i] = 1.e30;
}
}
ntr0=ntr;
m_ntr0=ntr;
ui->widePlot->draw(swide,red,i0);
}
}

View File

@ -64,6 +64,7 @@ private:
qint32 m_fSample;
qint32 m_TRperiod;
qint32 m_nsps;
qint32 m_ntr0;
Ui::WideGraph *ui;
};