mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-08-01 05:32:31 -04:00
Improved display of workable Q65 stations in Active Stations window.
This commit is contained in:
parent
58964d1f87
commit
e4dd4b98a8
@ -963,10 +963,7 @@ void MainWindow::guiUpdate()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(nsec != m_sec0) { //Once per second
|
if(nsec != m_sec0) { //Once per second
|
||||||
// mem_q65w.lock();
|
|
||||||
// ipc_wsjtx[1]=nsec%60;
|
|
||||||
// qDebug() << "AAA" << nsec%60 << ipc_wsjtx[0] << ipc_wsjtx[1];
|
// qDebug() << "AAA" << nsec%60 << ipc_wsjtx[0] << ipc_wsjtx[1];
|
||||||
// mem_q65w.unlock();
|
|
||||||
|
|
||||||
if(m_pctZap>30.0) {
|
if(m_pctZap>30.0) {
|
||||||
lab4->setStyleSheet("QLabel{background-color: #ff0000}");
|
lab4->setStyleSheet("QLabel{background-color: #ff0000}");
|
||||||
|
@ -62,7 +62,7 @@ void ActiveStations::displayRecentStations(QString mode, QString const& t)
|
|||||||
m_mode=mode;
|
m_mode=mode;
|
||||||
bool b=(m_mode=="Q65");
|
bool b=(m_mode=="Q65");
|
||||||
if(b) {
|
if(b) {
|
||||||
ui->header_label2->setText(" N Freq Call Tx Age");
|
ui->header_label2->setText(" N Freq S/N Call Grid Tx Age");
|
||||||
ui->label->setText("QSOs:");
|
ui->label->setText("QSOs:");
|
||||||
} else {
|
} else {
|
||||||
ui->header_label2->setText(" N Call Grid Az S/N Freq Tx Age Pts");
|
ui->header_label2->setText(" N Call Grid Az S/N Freq Tx Age Pts");
|
||||||
@ -74,13 +74,7 @@ void ActiveStations::displayRecentStations(QString mode, QString const& t)
|
|||||||
ui->label_3->setVisible(!b);
|
ui->label_3->setVisible(!b);
|
||||||
ui->score->setVisible(!b);
|
ui->score->setVisible(!b);
|
||||||
ui->sbMaxRecent->setVisible(!b);
|
ui->sbMaxRecent->setVisible(!b);
|
||||||
// ui->RecentStationsPlainTextEdit->setPlainText(t);
|
|
||||||
ui->RecentStationsPlainTextEdit->insertPlainText(t);
|
ui->RecentStationsPlainTextEdit->insertPlainText(t);
|
||||||
|
|
||||||
// QString t1= " 1. R7BI KN96 41 -12 764 0 0 18\n 2. LA6OP JP67 29 +07 696 0 0* 13\n 3. G0OUC IO93 49 -20 1628 0 0 13\n 4. G5EA IO93 49 -13 1747 0 0 13\n 5. G7BHU IO93 49 -17 1191 0 0 13\n 6. ON4EB JO11 50 -01 2188 0 0 13\n 7. K2AK DM41 264 +03 1432 0 0 8\n 8. N2DEE DM79 277 -01 1297 0 0 7\n 9. AK0MR DM59 279 +07 2478 0 0 7\n10. NK5G EM20 245 -07 2149 0 0 6\n"; //TEMP
|
|
||||||
// ui->RecentStationsPlainTextEdit->setPlainText(t1);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int ActiveStations::maxRecent()
|
int ActiveStations::maxRecent()
|
||||||
@ -104,7 +98,6 @@ void ActiveStations::on_textEdit_clicked()
|
|||||||
text = cursor.selectedText();
|
text = cursor.selectedText();
|
||||||
if(text!="") {
|
if(text!="") {
|
||||||
int nline=text.left(2).toInt()-1;
|
int nline=text.left(2).toInt()-1;
|
||||||
// qDebug() << "aa" << text << nline;
|
|
||||||
emit callSandP(nline);
|
emit callSandP(nline);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3676,18 +3676,16 @@ void MainWindow::ARRL_Digi_Display()
|
|||||||
|
|
||||||
void MainWindow::callSandP2(int n)
|
void MainWindow::callSandP2(int n)
|
||||||
{
|
{
|
||||||
if(m_ready2call[n]=="") return;
|
if(m_mode!="Q65" and m_ready2call[n]=="") return;
|
||||||
QStringList w=m_ready2call[n].split(' ', SkipEmptyParts);
|
QStringList w=m_ready2call[n].split(' ', SkipEmptyParts);
|
||||||
if(m_mode=="Q65") {
|
if(m_mode=="Q65") {
|
||||||
int nkhz=int(w[0].toFloat()+0.5);
|
double kHz=w[0].toDouble();
|
||||||
m_freqNominal=(1296*1000 + nkhz)* 1000;
|
m_freqNominal=(1296*1000 + kHz)* 1000;
|
||||||
int i0=1;
|
m_deCall=w[2];
|
||||||
if(w[1]=="*") i0=2;
|
m_deGrid=w[3];
|
||||||
m_deCall=w[i0];
|
m_txFirst=(w[4]=="0");
|
||||||
m_deGrid="";
|
// ui->TxFreqSpinBox->setValue(1500);
|
||||||
m_txFirst=(w[i0+1]=="0");
|
// qDebug() << "aa" << n << w;
|
||||||
ui->TxFreqSpinBox->setValue(1500);
|
|
||||||
// qDebug() << "cc" << n << w;
|
|
||||||
} else {
|
} else {
|
||||||
m_deCall=w[0];
|
m_deCall=w[0];
|
||||||
m_deGrid=w[1];
|
m_deGrid=w[1];
|
||||||
@ -3697,7 +3695,11 @@ void MainWindow::callSandP2(int n)
|
|||||||
m_bDoubleClicked=true; //### needed?
|
m_bDoubleClicked=true; //### needed?
|
||||||
ui->dxCallEntry->setText(m_deCall);
|
ui->dxCallEntry->setText(m_deCall);
|
||||||
ui->dxGridEntry->setText(m_deGrid);
|
ui->dxGridEntry->setText(m_deGrid);
|
||||||
genStdMsgs(w[3]); //### real SNR would be better here?
|
if(m_mode=="Q65") {
|
||||||
|
genStdMsgs(w[1]);
|
||||||
|
} else {
|
||||||
|
genStdMsgs(w[3]);
|
||||||
|
}
|
||||||
setTxMsg(1);
|
setTxMsg(1);
|
||||||
ui->txFirstCheckBox->setChecked(m_txFirst);
|
ui->txFirstCheckBox->setChecked(m_txFirst);
|
||||||
if (!ui->autoButton->isChecked()) ui->autoButton->click(); // Enable Tx
|
if (!ui->autoButton->isChecked()) ui->autoButton->click(); // Enable Tx
|
||||||
@ -9209,6 +9211,7 @@ void MainWindow::readWidebandDecodes()
|
|||||||
|
|
||||||
int nhr=0;
|
int nhr=0;
|
||||||
int nmin=0;
|
int nmin=0;
|
||||||
|
int nsnr=0;
|
||||||
while(m_fetched < q65wcom.ndecodes) {
|
while(m_fetched < q65wcom.ndecodes) {
|
||||||
QString line=QString::fromLatin1(q65wcom.result[m_fetched]);
|
QString line=QString::fromLatin1(q65wcom.result[m_fetched]);
|
||||||
nhr=line.mid(0,2).toInt();
|
nhr=line.mid(0,2).toInt();
|
||||||
@ -9219,12 +9222,13 @@ void MainWindow::readWidebandDecodes()
|
|||||||
int i2=i1 +1 + msg.mid(i1+1,-1).indexOf(" ");
|
int i2=i1 +1 + msg.mid(i1+1,-1).indexOf(" ");
|
||||||
QString dxcall=msg.mid(i1+1,i2-i1-1);
|
QString dxcall=msg.mid(i1+1,i2-i1-1);
|
||||||
QString w3=msg.mid(i2+1,-1);
|
QString w3=msg.mid(i2+1,-1);
|
||||||
|
nsnr=line.mid(22,3).toInt();
|
||||||
m_EMECall[dxcall].fsked=fsked;
|
m_EMECall[dxcall].fsked=fsked;
|
||||||
|
m_EMECall[dxcall].nsnr=nsnr;
|
||||||
m_EMECall[dxcall].t=60*nhr + nmin;
|
m_EMECall[dxcall].t=60*nhr + nmin;
|
||||||
m_EMECall[dxcall].worked=false; //### TEMPORARY ###
|
m_EMECall[dxcall].worked=false; //### TEMPORARY ###
|
||||||
if(w3.contains(grid_regexp)) m_EMECall[dxcall].grid4=w3;
|
if(w3.contains(grid_regexp)) m_EMECall[dxcall].grid4=w3;
|
||||||
m_fetched++;
|
m_fetched++;
|
||||||
// qDebug() << "aa" << q65wcom.ndecodes << m_fetched << q65wcom.nQDecoderDone << line;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update "m_wEMECall" by reading q65w_decodes.txt
|
// Update "m_wEMECall" by reading q65w_decodes.txt
|
||||||
@ -9232,6 +9236,7 @@ void MainWindow::readWidebandDecodes()
|
|||||||
QString t="";
|
QString t="";
|
||||||
QString t1;
|
QString t1;
|
||||||
QString dxcall;
|
QString dxcall;
|
||||||
|
QString dxgrid4;
|
||||||
QStringList list;
|
QStringList list;
|
||||||
float f[100];
|
float f[100];
|
||||||
int indx[100];
|
int indx[100];
|
||||||
@ -9240,15 +9245,19 @@ void MainWindow::readWidebandDecodes()
|
|||||||
m_ActiveStationsWidget->setClickOK(false);
|
m_ActiveStationsWidget->setClickOK(false);
|
||||||
int k=0;
|
int k=0;
|
||||||
for(i=m_EMECall.begin(); i!=m_EMECall.end(); i++) {
|
for(i=m_EMECall.begin(); i!=m_EMECall.end(); i++) {
|
||||||
|
int snr=i->nsnr;
|
||||||
int odd=1 - (i->t)%2;
|
int odd=1 - (i->t)%2;
|
||||||
int age=60*nhr + nmin - (i->t);
|
int age=60*nhr + nmin - (i->t);
|
||||||
if(age<0) age += 1440;
|
if(age<0) age += 1440;
|
||||||
if(age<=maxAge) {
|
if(age<=maxAge) {
|
||||||
dxcall=(i.key()+" ").left(8);
|
dxcall=(i.key()+" ").left(8);
|
||||||
|
dxgrid4=(i->grid4+"... ").left(4);
|
||||||
if(i->worked) {
|
if(i->worked) {
|
||||||
t1=t1.asprintf("%5.1f %8s %3d %3d\n",i->fsked,dxcall.toLatin1().constData(),odd,age);
|
t1=t1.asprintf("%5.1f %+03d %8s %4s %3d %3d\n",i->fsked,snr,dxcall.toLatin1().constData(),
|
||||||
|
dxgrid4.toLatin1().constData(),odd,age);
|
||||||
} else {
|
} else {
|
||||||
t1=t1.asprintf("%5.1f * %8s %3d %3d\n",i->fsked,dxcall.toLatin1().constData(),odd,age);
|
t1=t1.asprintf("%5.1f %+03d %8s %4s %3d %3d*\n",i->fsked,snr,dxcall.toLatin1().constData(),
|
||||||
|
dxgrid4.toLatin1().constData(),odd,age);
|
||||||
}
|
}
|
||||||
f[k]=i->fsked;
|
f[k]=i->fsked;
|
||||||
list.append(t1);
|
list.append(t1);
|
||||||
@ -9263,7 +9272,7 @@ void MainWindow::readWidebandDecodes()
|
|||||||
indexx_(f,&kz,indx);
|
indexx_(f,&kz,indx);
|
||||||
for(int k=0; k<kz; k++) {
|
for(int k=0; k<kz; k++) {
|
||||||
int j=indx[k]-1;
|
int j=indx[k]-1;
|
||||||
t1=t1.asprintf("%2d ",k+1);
|
t1=t1.asprintf("%2d. ",k+1);
|
||||||
t1+=list[j];
|
t1+=list[j];
|
||||||
m_ready2call[k]=list[j];
|
m_ready2call[k]=list[j];
|
||||||
t+=t1;
|
t+=t1;
|
||||||
|
@ -707,6 +707,7 @@ private:
|
|||||||
{
|
{
|
||||||
QString grid4;
|
QString grid4;
|
||||||
double fsked;
|
double fsked;
|
||||||
|
qint32 nsnr;
|
||||||
qint32 t;
|
qint32 t;
|
||||||
bool worked;
|
bool worked;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user