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

View File

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