diff --git a/lib/symspec.f90 b/lib/symspec.f90
index f28ccd694..ae265009d 100644
--- a/lib/symspec.f90
+++ b/lib/symspec.f90
@@ -88,10 +88,12 @@ subroutine symspec(k,ntrperiod,nsps,ingain,nb,nbslider,pxdb,s,red, &
fac=2.0/NFFT1
nblks=(k-k1)/kstep1
gain=10.0**(0.05*ingain)
+ sq=0.
do nblk=1,nblks
do i=1,NFFT1
x1(i)=gain*id2(k1+i)
enddo
+ sq=sq + dot_product(x1,x1)
! Mix at 1500 Hz, lowpass at +/-750 Hz, and downsample to 1500 Hz complex.
x2(106:105+kstep1)=x1(1:kstep1)
call fil3(x2,kstep1+105,c0(k8+1),n2)
@@ -102,10 +104,7 @@ subroutine symspec(k,ntrperiod,nsps,ingain,nb,nbslider,pxdb,s,red, &
npts8=k8
ja=ja+jstep !Index of first sample
- nsum=nblks*kstep1 - nzap
-
- if(nsum.le.0) nsum=1
- rms=sqrt(px/nsum)
+ rms=sqrt(sq/(nblks*NFFT1))
pxdb=0.
if(rms.gt.0.0) pxdb=20.0*log10(rms)
if(pxdb.gt.60.0) pxdb=60.0
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 84ede35d4..3cf6d18c2 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -181,6 +181,7 @@ MainWindow::MainWindow(QSharedMemory *shdmem, QWidget *parent) :
m_bMultipleOK=false;
m_dontReadFreq=false;
ui->readFreq->setEnabled(false);
+ m_QSOmsg="";
decodeBusy(false);
ui->xThermo->setFillBrush(Qt::green);
@@ -404,7 +405,6 @@ void MainWindow::writeSettings()
settings.setValue("Miles",m_bMiles);
settings.setValue("GUItab",ui->tabWidget->currentIndex());
settings.setValue("QuickCall",m_quickCall);
- settings.setValue("LeftColor",m_leftColor);
settings.setValue("73TxDisable",m_73TxDisable);
settings.setValue("Runaway",m_runaway);
settings.setValue("Tx2QSO",m_tx2QSO);
@@ -516,8 +516,6 @@ void MainWindow::readSettings()
ui->tabWidget->setCurrentIndex(n);
m_quickCall=settings.value("QuickCall",false).toBool();
ui->actionDouble_click_on_call_sets_Tx_Enable->setChecked(m_quickCall);
- m_leftColor=settings.value("LeftColor",false).toBool();
- ui->actionColor_highlighting_in_left_window->setChecked(m_leftColor);
m_73TxDisable=settings.value("73TxDisable",false).toBool();
ui->action_73TxDisable->setChecked(m_73TxDisable);
m_runaway=settings.value("Runaway",false).toBool();
@@ -1321,10 +1319,8 @@ void MainWindow::readFromStdout() //readFromStdout
}
QString bg="white";
- if(m_leftColor) {
- if(t.indexOf(" CQ ")>0) bg="#66ff66"; //green
- if(m_myCall!="" and t.indexOf(" "+m_myCall+" ")>0) bg="#ff6666"; //red
- }
+ if(t.indexOf(" CQ ")>0) bg="#66ff66"; //green
+ if(m_myCall!="" and t.indexOf(" "+m_myCall+" ")>0) bg="#ff6666"; //red
bool bQSO=abs(t.mid(22,4).toInt() - g_pWideGraph->QSOfreq()) < 10;
QString t1=t.mid(0,5) + t.mid(10,4) + t.mid(15,5) + t.mid(22,4) +
t.mid(32);
@@ -1338,13 +1334,12 @@ void MainWindow::readFromStdout() //readFromStdout
bf.setBackground(QBrush(QColor(bg)));
cursor.insertHtml(s);
ui->decodedTextBrowser2->setTextCursor(cursor);
+ m_QSOmsg=t1;
}
if(jt9com_.nagain==0) {
- if(!m_leftColor) {
- if(t.indexOf(" CQ ")>0) bg="#66ff66"; //green
- if(m_myCall!="" and t.indexOf(" "+m_myCall+" ")>0) bg="#ff6666"; //red
- }
+ if(t.indexOf(" CQ ")>0) bg="#66ff66"; //green
+ if(m_myCall!="" and t.indexOf(" "+m_myCall+" ")>0) bg="#ff6666"; //red
QString s = "
";
cursor = ui->decodedTextBrowser->textCursor();
@@ -1449,6 +1444,7 @@ void MainWindow::on_EraseButton_clicked() //Erase
{
qint64 ms=QDateTime::currentMSecsSinceEpoch();
ui->decodedTextBrowser2->clear();
+ m_QSOmsg="";
if((ms-m_msErase)<500) {
ui->decodedTextBrowser->clear();
QFile f(m_appDir + "/decoded.txt");
@@ -1903,6 +1899,24 @@ void MainWindow::doubleClickOnCall(bool shift, bool ctrl)
if(i5>0) t3=t3.mid(0,i5+3) + "_" + t3.mid(i5+4); //Make it "CQ_DX" (one word)
QStringList t4=t3.split(" ",QString::SkipEmptyParts);
if(t4.length() <5) return; //Skip the rest if no decoded text
+
+ int i9=m_QSOmsg.indexOf(t2);
+ if(i9<0) {
+ QString bg="white";
+ if(t2.indexOf(" CQ ")>0) bg="#66ff66"; //green
+ if(m_myCall!="" and t2.indexOf(" "+m_myCall+" ")>0) bg="#ff6666"; //red
+ QTextBlockFormat bf;
+ QString s = "";
+ cursor = ui->decodedTextBrowser2->textCursor();
+ cursor.movePosition(QTextCursor::End);
+ bf = cursor.blockFormat();
+ bf.setBackground(QBrush(QColor(bg)));
+ cursor.insertHtml(s);
+ ui->decodedTextBrowser2->setTextCursor(cursor);
+ m_QSOmsg=t2;
+ }
+
int nfreq=int(t4.at(3).toFloat());
g_pWideGraph->setQSOfreq(nfreq); //Set Rx freq
QString firstcall=t4.at(4);
@@ -2713,10 +2727,6 @@ void MainWindow::on_rptSpinBox_valueChanged(int n)
if(m_ntx==6) ui->txrb6->setChecked(true);
statusChanged();
}
-void MainWindow::on_actionColor_highlighting_in_left_window_triggered(bool checked)
-{
- m_leftColor=checked;
-}
void MainWindow::on_action_73TxDisable_triggered(bool checked)
{
diff --git a/mainwindow.h b/mainwindow.h
index 26d26516e..febcd6c5a 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -143,7 +143,6 @@ private slots:
void on_freeTextMsg_editingFinished();
void on_actionDouble_click_on_call_sets_Tx_Enable_triggered(bool checked);
void on_rptSpinBox_valueChanged(int n);
- void on_actionColor_highlighting_in_left_window_triggered(bool checked);
void on_action_73TxDisable_triggered(bool checked);
void on_actionRunaway_Tx_watchdog_triggered(bool checked);
void on_actionTx2QSO_triggered(bool checked);
@@ -246,7 +245,6 @@ private:
bool m_decodedText2;
bool m_freeText;
bool m_quickCall;
- bool m_leftColor;
bool m_73TxDisable;
bool m_sent73;
bool m_runaway;
@@ -316,6 +314,7 @@ private:
QString m_cmnd;
QString m_msgSent0;
QString m_fileToSave;
+ QString m_QSOmsg;
QStringList m_macro;
QStringList m_dFreq;
diff --git a/mainwindow.ui b/mainwindow.ui
index 7bafe1c14..f08f3914e 100644
--- a/mainwindow.ui
+++ b/mainwindow.ui
@@ -2248,7 +2248,6 @@ p, li { white-space: pre-wrap; }
-
@@ -2785,14 +2784,6 @@ p, li { white-space: pre-wrap; }
Double-click on call sets Tx Enable
-
-
- true
-
-
- Color highlighting in left window
-
-
true