Make ARRL_Digi_Display() [executed at end of decodeDone()] a separate function.

This commit is contained in:
Joe Taylor 2022-03-16 11:35:40 -04:00
parent 04836a447d
commit 9761c10648
2 changed files with 28 additions and 27 deletions

View File

@ -3363,36 +3363,36 @@ void MainWindow::decodeDone ()
m_bNoMoreFiles=false;
}
if((m_mode=="FT4" or m_mode=="FT8") and SpecOp::ARRL_DIGI==m_config.special_op_id()) {
// Update the ARRL_DIGI display, etc.
if(m_latestDecodeTime<0) return;
if((m_mode=="FT4" or m_mode=="FT8") and SpecOp::ARRL_DIGI==m_config.special_op_id()
and m_latestDecodeTime>=0) ARRL_Digi_Display(); // Update the ARRL_DIGI display
}
QMutableMapIterator<QString,RecentCall> icall(m_recentCall);
QString deCall;
int age=0;
int i=0;
int maxAge=4;
int points=0;
int maxPoints=0;
while (icall.hasNext()) {
icall.next();
deCall=icall.key();
age=int((m_latestDecodeTime - icall.value().decodeTime)/m_TRperiod + 0.5);
if(age>maxAge) {
qDebug() << "bb" << i << deCall << "removed";
icall.remove();
} else {
i++;
points=m_activeCall[deCall].points;
if(points>maxPoints) maxPoints=points;
QString t;
t = t.asprintf(" %2d %2d",age,points);
t = (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t;
qDebug() << "cc" << t << m_activeCall.count() << m_recentCall.count();
}
void MainWindow::ARRL_Digi_Display()
{
QMutableMapIterator<QString,RecentCall> icall(m_recentCall);
QString deCall;
int age=0;
int i=0;
int maxAge=4;
int points=0;
int maxPoints=0;
while (icall.hasNext()) {
icall.next();
deCall=icall.key();
age=int((m_latestDecodeTime - icall.value().decodeTime)/m_TRperiod + 0.5);
if(age>maxAge) {
qDebug() << "bb" << i << deCall << "removed";
icall.remove();
} else {
i++;
points=m_activeCall[deCall].points;
if(points>maxPoints) maxPoints=points;
QString t;
t = t.asprintf(" %2d %2d",age,points);
t = (deCall + " ").left(6) + " " + m_activeCall[deCall].grid4 + t;
qDebug() << "cc" << t << m_activeCall.count() << m_recentCall.count();
}
}
}
void MainWindow::readFromStdout() //readFromStdout

View File

@ -812,6 +812,7 @@ private:
void to_jt9(qint32 n, qint32 istart, qint32 idone);
bool is77BitMode () const;
void cease_auto_Tx_after_QSO ();
void ARRL_Digi_Display();
};
extern int killbyname(const char* progName);