diff --git a/lib/symspec.f90 b/lib/symspec.f90 index b28c60bf9..37729dd97 100644 --- a/lib/symspec.f90 +++ b/lib/symspec.f90 @@ -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 diff --git a/mainwindow.cpp b/mainwindow.cpp index e4ab8bdfb..f2dde999a 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -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); diff --git a/plotter.cpp b/plotter.cpp index 434003f36..279defafa 100644 --- a/plotter.cpp +++ b/plotter.cpp @@ -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; diff --git a/widegraph.cpp b/widegraph.cpp index dd711bded..6e0a19226 100644 --- a/widegraph.cpp +++ b/widegraph.cpp @@ -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 && ntrwidePlot->draw(swide,red,i0); } } diff --git a/widegraph.h b/widegraph.h index 6e3da63a5..611d35f66 100644 --- a/widegraph.h +++ b/widegraph.h @@ -64,6 +64,7 @@ private: qint32 m_fSample; qint32 m_TRperiod; qint32 m_nsps; + qint32 m_ntr0; Ui::WideGraph *ui; };