From 69cdb486cfcbaf78bde9d0926a8f876263ef9558 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 15 Aug 2024 11:33:46 -0400 Subject: [PATCH] Reset red/greep goal posts in Wide Graph for SuperFox and SuperHound. --- widgets/mainwindow.cpp | 4 ++++ widgets/plotter.cpp | 12 ++++++++++-- widgets/plotter.h | 2 ++ widgets/widegraph.cpp | 5 +++++ widgets/widegraph.h | 1 + 5 files changed, 22 insertions(+), 2 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 63a6e72c0..870d5d740 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -2158,6 +2158,7 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog set_mode(m_mode); configActiveStations(); } + if(m_mode=="FT8") on_actionFT8_triggered(); //in case we need to reset some things for Fox/Hound } void MainWindow::on_monitorButton_clicked (bool checked) @@ -7258,8 +7259,10 @@ void MainWindow::on_actionFT8_triggered() ui->cbHoldTxFreq->setChecked(true); ui->cbAutoSeq->setEnabled(false); ui->tabWidget->setCurrentIndex(1); + m_wideGraph->setSuperFox(false); if(m_config.superFox()) { ui->TxFreqSpinBox->setValue(750); //SuperFox transmits at 750 Hz + m_wideGraph->setSuperFox(true); } else { ui->TxFreqSpinBox->setValue(300); } @@ -7279,6 +7282,7 @@ void MainWindow::on_actionFT8_triggered() ui->cbAutoSeq->setEnabled(false); ui->tabWidget->setCurrentIndex(0); ui->cbHoldTxFreq->setChecked(true); + m_wideGraph->setSuperHound(false); if(m_config.superFox()) { // 01234567890123456789012345678901234567 displayWidgets(nWidgets("11111000010011000001000000000011000000")); diff --git a/widgets/plotter.cpp b/widgets/plotter.cpp index 8ccab09b6..fd64b3d02 100644 --- a/widgets/plotter.cpp +++ b/widgets/plotter.cpp @@ -610,7 +610,7 @@ void CPlotter::DrawOverlay() //DrawOverlay() painter0.drawLine(x6,20,x6,26); } else { - // Draw the green "goal post" + // Draw the green goal post painter0.setPen(penGreen); x1=XfromFreq(m_rxFreq); x2=XfromFreq(m_rxFreq+bw); @@ -630,12 +630,13 @@ void CPlotter::DrawOverlay() //DrawOverlay() painter0.setPen(penRed); x1=XfromFreq(m_txFreq); x2=XfromFreq(m_txFreq+bw); + if(m_bSuperFox) x2=XfromFreq(m_txFreq+1500.0); if(m_mode=="WSPR") { bw=4*12000.0/8192.0; //WSPR x1=XfromFreq(m_txFreq-0.5*bw); x2=XfromFreq(m_txFreq+0.5*bw); } - // Draw the red "goal post" + // Draw the red goal post painter0.drawLine(x1,yTxTop,x1,yTxTop+yh); painter0.drawLine(x1,yTxTop,x2,yTxTop); painter0.drawLine(x2,yTxTop,x2,yTxTop+yh); @@ -888,9 +889,16 @@ void CPlotter::setFlatten(bool b1, bool b2) if(b2) m_Flatten=2; } +void CPlotter::setSuperFox(bool b) +{ + m_bSuperFox=b; + if(m_bSuperFox) m_bSuperHound=false; +} + void CPlotter::setSuperHound(bool b) { m_bSuperHound=b; + if(m_bSuperHound) m_bSuperFox=false; } void CPlotter::setTol(int n) //setTol() diff --git a/widgets/plotter.h b/widgets/plotter.h index 54bbfe9c9..38dc0e438 100644 --- a/widgets/plotter.h +++ b/widgets/plotter.h @@ -77,6 +77,7 @@ public: void setColours(QVector const& cl); void setFlatten(bool b1, bool b2); void setTol(int n); + void setSuperFox(bool b); void setSuperHound(bool b); void setRxBand(QString band); void setReference(bool b) {m_bReference = b;} @@ -126,6 +127,7 @@ private: bool m_bSingleDecode; bool m_bFirst=true; bool m_bResized; + bool m_bSuperFox=false; bool m_bSuperHound=false; float m_fSpan; diff --git a/widgets/widegraph.cpp b/widgets/widegraph.cpp index c115ee6f2..ce2ebd6f1 100644 --- a/widgets/widegraph.cpp +++ b/widgets/widegraph.cpp @@ -498,6 +498,11 @@ void WideGraph::on_zero2dSlider_valueChanged(int value) //Zero2 } } +void WideGraph::setSuperFox(bool b) +{ + ui->widePlot->setSuperFox(b); +} + void WideGraph::setSuperHound(bool b) { ui->widePlot->setSuperHound(b); diff --git a/widgets/widegraph.h b/widgets/widegraph.h index 17f3eecc2..171f3d27b 100644 --- a/widgets/widegraph.h +++ b/widgets/widegraph.h @@ -42,6 +42,7 @@ public: bool flatten(); bool useRef(); void setTol(int n); + void setSuperFox(bool b); void setSuperHound(bool b); int smoothYellow(); void setRxBand (QString const& band);