mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-04 08:21:17 -05:00
Cleaned up some display matters for nfast=2 modes.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@2577 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
0e1ce7ba36
commit
c0800fbcec
@ -5,7 +5,7 @@
|
||||
complex cx(npts),cy(npts)
|
||||
real a(5)
|
||||
complex w,wstep,za,zb,z
|
||||
real ss(2600)
|
||||
real ss(3000)
|
||||
complex csx(0:NMAX/64),csy(0:NMAX/64)
|
||||
data twopi/6.283185307/a1,a2,a3/99.,99.,99./
|
||||
save
|
||||
|
@ -1960,6 +1960,7 @@ void MainWindow::on_actionJT65A_triggered()
|
||||
soundInThread.setPeriod(m_TRperiod);
|
||||
soundOutThread.setPeriod(m_TRperiod);
|
||||
g_pWideGraph->setMode65(m_mode65);
|
||||
g_pWideGraph->setPeriod(m_TRperiod);
|
||||
lab5->setStyleSheet("QLabel{background-color: #ff6ec7}");
|
||||
lab5->setText(m_mode);
|
||||
ui->actionJT65A->setChecked(true);
|
||||
@ -1974,6 +1975,7 @@ void MainWindow::on_actionJT65B_triggered()
|
||||
soundInThread.setPeriod(m_TRperiod);
|
||||
soundOutThread.setPeriod(m_TRperiod);
|
||||
g_pWideGraph->setMode65(m_mode65);
|
||||
g_pWideGraph->setPeriod(m_TRperiod);
|
||||
lab5->setStyleSheet("QLabel{background-color: #ffff00}");
|
||||
lab5->setText(m_mode);
|
||||
ui->actionJT65B->setChecked(true);
|
||||
@ -1988,6 +1990,7 @@ void MainWindow::on_actionJT65C_triggered()
|
||||
soundInThread.setPeriod(m_TRperiod);
|
||||
soundOutThread.setPeriod(m_TRperiod);
|
||||
g_pWideGraph->setMode65(m_mode65);
|
||||
g_pWideGraph->setPeriod(m_TRperiod);
|
||||
lab5->setStyleSheet("QLabel{background-color: #ffa500}");
|
||||
lab5->setText(m_mode);
|
||||
ui->actionJT65C->setChecked(true);
|
||||
@ -2002,6 +2005,7 @@ void MainWindow::on_actionJT65B2_triggered()
|
||||
soundInThread.setPeriod(m_TRperiod);
|
||||
soundOutThread.setPeriod(m_TRperiod);
|
||||
g_pWideGraph->setMode65(m_mode65);
|
||||
g_pWideGraph->setPeriod(m_TRperiod);
|
||||
lab5->setStyleSheet("QLabel{background-color: #7fff00}");
|
||||
lab5->setText(m_mode);
|
||||
ui->actionJT65B2->setChecked(true);
|
||||
@ -2016,6 +2020,7 @@ void MainWindow::on_actionJT65C2_triggered()
|
||||
soundInThread.setPeriod(m_TRperiod);
|
||||
soundOutThread.setPeriod(m_TRperiod);
|
||||
g_pWideGraph->setMode65(m_mode65);
|
||||
g_pWideGraph->setPeriod(m_TRperiod);
|
||||
lab5->setStyleSheet("QLabel{background-color: #97ffff}");
|
||||
lab5->setText(m_mode);
|
||||
ui->actionJT65C2->setChecked(true);
|
||||
|
19
plotter.cpp
19
plotter.cpp
@ -109,16 +109,18 @@ void CPlotter::paintEvent(QPaintEvent *) // paintEvent()
|
||||
int k=x0;
|
||||
for(int j=1; j<h; j++) {
|
||||
k += 32768;
|
||||
for(int i=0; i<w; i++) {
|
||||
painter2.setPen(m_ColorTbl[m_zwf[i+k]]);
|
||||
painter2.drawPoint(i,j);
|
||||
if(x0 != x00 and x00 != -99) {
|
||||
for(int i=0; i<w; i++) {
|
||||
painter2.setPen(m_ColorTbl[m_zwf[i+k]]);
|
||||
painter2.drawPoint(i,j);
|
||||
}
|
||||
}
|
||||
if(j == 15) { //Does this do nothing ???
|
||||
if(j == 13 and x0 == x00) {
|
||||
painter2.setPen(m_ColorTbl[255]);
|
||||
painter2.drawText(5,10,m_sutc);
|
||||
}
|
||||
}
|
||||
} else if(m_line == 15) {
|
||||
} else if(m_line == 13) {
|
||||
painter2.setPen(m_ColorTbl[255]);
|
||||
UTCstr();
|
||||
painter2.drawText(5,10,m_sutc);
|
||||
@ -132,7 +134,7 @@ void CPlotter::paintEvent(QPaintEvent *) // paintEvent()
|
||||
m_paintEventBusy=false;
|
||||
}
|
||||
|
||||
void CPlotter::draw(float s[], int i0, float splot[]) //draw()
|
||||
void CPlotter::draw(float s[], int i0, float splot[]) //draw()
|
||||
{
|
||||
int i,j,w,h;
|
||||
float y;
|
||||
@ -207,10 +209,11 @@ void CPlotter::draw(float s[], int i0, float splot[]) //dr
|
||||
|
||||
if(s[0]>1.0e29) m_line=0;
|
||||
m_line++;
|
||||
if(m_line == 15) {
|
||||
if(m_line == 13) {
|
||||
UTCstr();
|
||||
painter1.setPen(m_ColorTbl[255]);
|
||||
painter1.drawText(5,10,m_sutc);
|
||||
m_paintAllZoom=true;
|
||||
}
|
||||
update(); //trigger a new paintEvent
|
||||
}
|
||||
@ -229,6 +232,8 @@ void CPlotter::UTCstr()
|
||||
imin=imin % 60;
|
||||
isec=(ms/1000) % 60;
|
||||
}
|
||||
if(isec<30) isec=0;
|
||||
if(isec>=30) isec=30;
|
||||
sprintf(m_sutc,"%2.2d:%2.2d:%2.2d",ihr,imin,isec);
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ void WideGraph::dataSink2(float s[], int nkhz, int ihsym, int ndiskdata,
|
||||
int nbpp = ui->widePlot->binsPerPixel();
|
||||
static int n=0;
|
||||
static int nkhz0=-999;
|
||||
static int n60z=0;
|
||||
static int ntrz=0;
|
||||
|
||||
df = m_fSample/32768.0;
|
||||
if(nkhz != nkhz0) {
|
||||
@ -123,9 +123,9 @@ void WideGraph::dataSink2(float s[], int nkhz, int ihsym, int ndiskdata,
|
||||
|
||||
// Time according to this computer
|
||||
qint64 ms = QDateTime::currentMSecsSinceEpoch() % 86400000;
|
||||
int n60 = (ms/1000) % 60;
|
||||
int ntr = (ms/1000) % m_TRperiod;
|
||||
|
||||
if((ndiskdata && ihsym <= m_waterfallAvg) || (!ndiskdata && n60<n60z)) {
|
||||
if((ndiskdata && ihsym <= m_waterfallAvg) || (!ndiskdata && ntr<ntrz)) {
|
||||
for (int i=0; i<2048; i++) {
|
||||
swide[i] = 1.e30;
|
||||
}
|
||||
@ -133,7 +133,7 @@ void WideGraph::dataSink2(float s[], int nkhz, int ihsym, int ndiskdata,
|
||||
splot[i] = 1.e30;
|
||||
}
|
||||
}
|
||||
n60z=n60;
|
||||
ntrz=ntr;
|
||||
ui->widePlot->draw(swide,i0,splot);
|
||||
}
|
||||
}
|
||||
@ -316,3 +316,8 @@ double WideGraph::fGreen()
|
||||
{
|
||||
return ui->widePlot->fGreen();
|
||||
}
|
||||
|
||||
void WideGraph::setPeriod(int n)
|
||||
{
|
||||
m_TRperiod=n;
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ public:
|
||||
void setPalette(QString palette);
|
||||
void setFsample(int n);
|
||||
void setMode65(int n);
|
||||
void setPeriod(int n);
|
||||
double fGreen();
|
||||
|
||||
qint32 m_qsoFreq;
|
||||
@ -66,6 +67,7 @@ private:
|
||||
qint32 m_fCal;
|
||||
qint32 m_fSample;
|
||||
qint32 m_mode65;
|
||||
qint32 m_TRperiod;
|
||||
|
||||
Ui::WideGraph *ui;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user