mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-23 20:58:55 -05:00
Better logic for WSPR scheduling. Don't overwrite a grid6 with grid4
obtained by double-clicking on a decode. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5452 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
4884a9aeb2
commit
0a2823b611
@ -204,20 +204,20 @@ MainWindow::MainWindow(bool multiple, QSettings * settings, QSharedMemory *shdme
|
|||||||
});
|
});
|
||||||
connect (m_messageClient, &MessageClient::error, this, &MainWindow::networkError);
|
connect (m_messageClient, &MessageClient::error, this, &MainWindow::networkError);
|
||||||
connect (m_messageClient, &MessageClient::free_text, [this] (QString const& text, bool send) {
|
connect (m_messageClient, &MessageClient::free_text, [this] (QString const& text, bool send) {
|
||||||
if (m_config.accept_udp_requests ()) {
|
if (m_config.accept_udp_requests ()) {
|
||||||
if (0 == ui->tabWidget->currentIndex ()) {
|
if (0 == ui->tabWidget->currentIndex ()) {
|
||||||
ui->tx5->setCurrentText (text);
|
ui->tx5->setCurrentText (text);
|
||||||
if (send) {
|
if (send) {
|
||||||
ui->txb5->click ();
|
ui->txb5->click ();
|
||||||
}
|
}
|
||||||
} else if (1 == ui->tabWidget->currentIndex ()) {
|
} else if (1 == ui->tabWidget->currentIndex ()) {
|
||||||
ui->freeTextMsg->setCurrentText (text);
|
ui->freeTextMsg->setCurrentText (text);
|
||||||
if (send) {
|
if (send) {
|
||||||
ui->rbFreeText->click ();
|
ui->rbFreeText->click ();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
|
||||||
on_EraseButton_clicked ();
|
on_EraseButton_clicked ();
|
||||||
|
|
||||||
@ -1847,11 +1847,17 @@ void MainWindow::guiUpdate()
|
|||||||
m_nseq = nsec % m_TRperiod;
|
m_nseq = nsec % m_TRperiod;
|
||||||
|
|
||||||
if(m_mode.mid(0,4)=="WSPR") {
|
if(m_mode.mid(0,4)=="WSPR") {
|
||||||
if(m_nseq==0 and m_ntr==0) {
|
if(m_nseq==0 and m_ntr==0) { //Decide whether to Tx or Rx
|
||||||
m_tuneup=false;
|
m_tuneup=false; //This is not an ATU tuneup
|
||||||
if(m_pctx==0) m_nrx=1; //Always receive if pctx=0
|
if(m_pctx==0) m_nrx=1; //Don't transmit if m_pctx=0
|
||||||
if((m_auto and (m_pctx>0) and (m_txNext or ((m_nrx<=0) and
|
bool btx = m_auto and (m_nrx<=0); //To Tx, we need m_auto and Rx sequsnce finished
|
||||||
(m_ntr!=-1)))) or ((m_auto and (m_pctx==100)))) {
|
if(m_ntr == -1) btx=false; //Normally, no two consecutive transmissions
|
||||||
|
if(m_auto and m_txNext) btx=true; //TxNext button overrides
|
||||||
|
if(m_auto and m_pctx==100) btx=true; //Always transmit
|
||||||
|
|
||||||
|
// qDebug() << "B" << m_pctx << m_auto << m_nrx << m_ntr << m_txNext;
|
||||||
|
|
||||||
|
if(btx) {
|
||||||
// This will be a WSPR Tx sequence. Compute # of Rx's that should follow.
|
// This will be a WSPR Tx sequence. Compute # of Rx's that should follow.
|
||||||
float x=(float)rand()/RAND_MAX;
|
float x=(float)rand()/RAND_MAX;
|
||||||
if(m_pctx<50) {
|
if(m_pctx<50) {
|
||||||
@ -1921,9 +1927,11 @@ void MainWindow::guiUpdate()
|
|||||||
m_bTxTime=false; //Time to stop a WSPR transmission
|
m_bTxTime=false; //Time to stop a WSPR transmission
|
||||||
m_btxok=false;
|
m_btxok=false;
|
||||||
}
|
}
|
||||||
if(m_bandHopping and m_ntr==1) {
|
if(m_ntr==1) {
|
||||||
qDebug() << "Call bandHopping after Rx" << m_nseq << m_ntr << m_nrx << m_rxDone;
|
if(m_bandHopping) {
|
||||||
bandHopping();
|
// qDebug() << "Call bandHopping after Rx" << m_nseq << m_ntr << m_nrx << m_rxDone;
|
||||||
|
bandHopping();
|
||||||
|
}
|
||||||
m_ntr=0; //This WSPR Rx sequence is complete
|
m_ntr=0; //This WSPR Rx sequence is complete
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2147,7 +2155,7 @@ void MainWindow::guiUpdate()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(nsec != m_sec0) { //Once per second
|
if(nsec != m_sec0) { //Once per second
|
||||||
qDebug() << "A" << nsec << m_pctx << m_rxavg << m_nrx;
|
// qDebug() << "A" << nsec << m_pctx << m_rxavg << m_ntr << m_nrx;
|
||||||
int ipct=0;
|
int ipct=0;
|
||||||
if(m_monitoring or m_transmitting) ipct=int(100*m_nseq/txDuration);
|
if(m_monitoring or m_transmitting) ipct=int(100*m_nseq/txDuration);
|
||||||
progressBar->setValue(ipct);
|
progressBar->setValue(ipct);
|
||||||
@ -2286,9 +2294,11 @@ void MainWindow::stopTx2()
|
|||||||
msgBox("Runaway Tx watchdog");
|
msgBox("Runaway Tx watchdog");
|
||||||
m_repeatMsg=0;
|
m_repeatMsg=0;
|
||||||
}
|
}
|
||||||
if(m_mode.mid(0,4)=="WSPR" and m_ntr==-1 and m_bandHopping and !m_tuneup) {
|
if(m_mode.mid(0,4)=="WSPR" and m_ntr==-1 and !m_tuneup) {
|
||||||
qDebug () << "Call bandHopping after Tx" << m_tuneup;
|
if(m_bandHopping) {
|
||||||
bandHopping();
|
qDebug () << "Call bandHopping after Tx" << m_tuneup;
|
||||||
|
bandHopping();
|
||||||
|
}
|
||||||
m_ntr=0;
|
m_ntr=0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2491,8 +2501,9 @@ void MainWindow::processMessage(QString const& messages, int position, bool ctrl
|
|||||||
// i.e. compound version of same base call
|
// i.e. compound version of same base call
|
||||||
ui->dxCallEntry->setText(hiscall);
|
ui->dxCallEntry->setText(hiscall);
|
||||||
}
|
}
|
||||||
if (gridOK(hisgrid))
|
if (gridOK(hisgrid)) {
|
||||||
ui->dxGridEntry->setText(hisgrid);
|
if(ui->dxGridEntry->text().mid(0,4) != hisgrid) ui->dxGridEntry->setText(hisgrid);
|
||||||
|
}
|
||||||
if (ui->dxGridEntry->text()=="")
|
if (ui->dxGridEntry->text()=="")
|
||||||
lookup();
|
lookup();
|
||||||
m_hisGrid = ui->dxGridEntry->text();
|
m_hisGrid = ui->dxGridEntry->text();
|
||||||
@ -4241,8 +4252,8 @@ void MainWindow::on_sbTxPercent_valueChanged(int n)
|
|||||||
ui->pbTxNext->setEnabled(true);
|
ui->pbTxNext->setEnabled(true);
|
||||||
} else {
|
} else {
|
||||||
m_txNext=false;
|
m_txNext=false;
|
||||||
ui->pbTxNext->setEnabled(false);
|
|
||||||
ui->pbTxNext->setChecked(false);
|
ui->pbTxNext->setChecked(false);
|
||||||
|
ui->pbTxNext->setEnabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>825</width>
|
<width>825</width>
|
||||||
<height>460</height>
|
<height>480</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -19,7 +19,7 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
<height>460</height>
|
<height>480</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
|
Loading…
Reference in New Issue
Block a user