mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-07-13 14:24:08 -04:00
Try reading freq up to three times before complaining of failure and
abouring CAT control. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3475 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
+11
-8
@@ -1782,18 +1782,21 @@ void MainWindow::guiUpdate()
|
||||
}
|
||||
|
||||
if(m_catEnabled and m_poll>0 and (nsec%m_poll)==0) {
|
||||
double fMHz;
|
||||
if(m_dontReadFreq) {
|
||||
m_dontReadFreq=false;
|
||||
} else if(!m_transmitting) {
|
||||
double fMHz=rig->getFreq(RIG_VFO_CURR)/1000000.0;
|
||||
if(fMHz<0.0) {
|
||||
rt.sprintf("Rig control error %d\nFailed to read frequency.",
|
||||
int(1000000.0*fMHz));
|
||||
msgBox(rt);
|
||||
m_catEnabled=false;
|
||||
ui->readFreq->setStyleSheet("QPushButton{background-color: red; \
|
||||
border-width: 0px; border-radius: 5px;}");
|
||||
for(int iter=0; iter<3; iter++) {
|
||||
fMHz=rig->getFreq(RIG_VFO_CURR)/1000000.0;
|
||||
if(fMHz<0.0 and iter>=2) {
|
||||
rt.sprintf("Rig control error %d\nFailed to read frequency.",
|
||||
int(1000000.0*fMHz));
|
||||
msgBox(rt);
|
||||
m_catEnabled=false;
|
||||
ui->readFreq->setStyleSheet("QPushButton{background-color: red; \
|
||||
border-width: 0px; border-radius: 5px;}");
|
||||
}
|
||||
}
|
||||
int ndiff=1000000.0*(fMHz-m_dialFreq);
|
||||
if(ndiff!=0) dialFreqChanged2(fMHz);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user