Fix the logic for replying to a CQ responder who sends report instead of grid.

This commit is contained in:
Joe Taylor 2022-03-27 10:21:22 -04:00
parent 2d3914eb2d
commit b219b59296

View File

@ -3729,7 +3729,7 @@ void MainWindow::readFromStdout() //readFromStdout
}
}
if(m_bCallingCQ && !m_bAutoReply && for_us && SpecOp::FOX > m_config.special_op_id()) {
if(ui->respondComboBox->currentText()=="CQ: First") {
if(ui->respondComboBox->currentText()!="CQ: First") {
m_bDoubleClicked=true;
m_bAutoReply = true;
processMessage (decodedtext);
@ -3738,19 +3738,21 @@ void MainWindow::readFromStdout() //readFromStdout
if(ui->respondComboBox->currentText()=="CQ: Max Dist") {
QString deCall;
QString deGrid;
bool bContest=m_config.special_op_id()==SpecOp::NA_VHF or
m_config.special_op_id()==SpecOp::ARRL_DIGI;
decodedtext.deCallAndGrid(/*out*/deCall,deGrid);
if(deGrid.contains(grid_regexp) or
(bContest and (deGrid.contains("+") or deGrid.contains("-")))) {
double utch=0.0;
int nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter;
azdist_(const_cast <char *> ((m_config.my_grid () + " ").left (6).toLatin1 ().constData ()),
const_cast <char *> ((deGrid + " ").left(6).toLatin1 ().constData ()),&utch,
&nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,(FCL)6,(FCL)6);
int points=nDkm/500;
if(nDkm > 500*points) points += 1;
points += 1;
(deGrid.contains("+") or deGrid.contains("-"))) {
int points=0;
if(deGrid.contains(grid_regexp)) {
double utch=0.0;
int nAz,nEl,nDmiles,nDkm,nHotAz,nHotABetter;
azdist_(const_cast <char *> ((m_config.my_grid () + " ").left (6).toLatin1 ().constData ()),
const_cast <char *> ((deGrid + " ").left(6).toLatin1 ().constData ()),&utch,
&nAz,&nEl,&nDmiles,&nDkm,&nHotAz,&nHotABetter,(FCL)6,(FCL)6);
points=nDkm/500;
if(nDkm > 500*points) points += 1;
points += 1;
}
if(points>m_maxPoints) {
m_maxPoints=points;
m_deCall=deCall;
@ -3760,6 +3762,7 @@ void MainWindow::readFromStdout() //readFromStdout
ui->dxGridEntry->setText(deGrid);
genStdMsgs(QString::number(decodedtext.snr()));
int ntx=2;
bool bContest=m_config.special_op_id()==SpecOp::NA_VHF or m_config.special_op_id()==SpecOp::ARRL_DIGI;
if(bContest) ntx=3;
setTxMsg(ntx);
}