Allow user to set center frequency and FTol in FST4W mode. Needs more testing!

This commit is contained in:
Joe Taylor 2020-09-05 10:34:55 -04:00
parent 1471ac0312
commit c1025b7c4c
4 changed files with 131 additions and 58 deletions

View File

@ -1145,6 +1145,8 @@ void MainWindow::writeSettings()
m_settings->setValue("RxFreq",ui->RxFreqSpinBox->value()); m_settings->setValue("RxFreq",ui->RxFreqSpinBox->value());
m_settings->setValue("TxFreq",ui->TxFreqSpinBox->value()); m_settings->setValue("TxFreq",ui->TxFreqSpinBox->value());
m_settings->setValue("WSPRfreq",ui->WSPRfreqSpinBox->value()); m_settings->setValue("WSPRfreq",ui->WSPRfreqSpinBox->value());
m_settings->setValue("FST4W_RxFreq",ui->sbFST4W_RxFreq->value());
m_settings->setValue("FST4W_FTol",ui->sbFST4W_FTol->value());
m_settings->setValue("SubMode",ui->sbSubmode->value()); m_settings->setValue("SubMode",ui->sbSubmode->value());
m_settings->setValue("DTtol",m_DTtol); m_settings->setValue("DTtol",m_DTtol);
m_settings->setValue("Ftol", ui->sbFtol->value ()); m_settings->setValue("Ftol", ui->sbFtol->value ());
@ -1232,8 +1234,11 @@ void MainWindow::readSettings()
ui->actionSave_all->setChecked(m_settings->value("SaveAll",false).toBool()); ui->actionSave_all->setChecked(m_settings->value("SaveAll",false).toBool());
ui->RxFreqSpinBox->setValue(0); // ensure a change is signaled ui->RxFreqSpinBox->setValue(0); // ensure a change is signaled
ui->RxFreqSpinBox->setValue(m_settings->value("RxFreq",1500).toInt()); ui->RxFreqSpinBox->setValue(m_settings->value("RxFreq",1500).toInt());
ui->sbFST4W_RxFreq->setValue(0);
ui->sbFST4W_RxFreq->setValue(m_settings->value("FST4W_RxFreq",1500).toInt());
m_nSubMode=m_settings->value("SubMode",0).toInt(); m_nSubMode=m_settings->value("SubMode",0).toInt();
ui->sbFtol->setValue (m_settings->value("Ftol", 50).toInt()); ui->sbFtol->setValue (m_settings->value("Ftol", 50).toInt());
ui->sbFST4W_FTol->setValue(m_settings->value("FST4W_FTol",100).toInt());
m_minSync=m_settings->value("MinSync",0).toInt(); m_minSync=m_settings->value("MinSync",0).toInt();
ui->syncSpinBox->setValue(m_minSync); ui->syncSpinBox->setValue(m_minSync);
ui->cbAutoSeq->setChecked (m_settings->value ("AutoSeq", false).toBool()); ui->cbAutoSeq->setChecked (m_settings->value ("AutoSeq", false).toBool());
@ -3079,6 +3084,7 @@ void MainWindow::decode() //decode()
dec_data.params.ntol=20; dec_data.params.ntol=20;
dec_data.params.naggressive=0; dec_data.params.naggressive=0;
} }
if(m_mode=="FST4W") dec_data.params.ntol=ui->sbFST4W_FTol->value ();
if(dec_data.params.nutc < m_nutc0) m_RxLog = 1; //Date and Time to file "ALL.TXT". if(dec_data.params.nutc < m_nutc0) m_RxLog = 1; //Date and Time to file "ALL.TXT".
if(dec_data.params.newdat==1 and !m_diskData) m_nutc0=dec_data.params.nutc; if(dec_data.params.newdat==1 and !m_diskData) m_nutc0=dec_data.params.nutc;
dec_data.params.ntxmode=9; dec_data.params.ntxmode=9;
@ -5995,10 +6001,9 @@ void MainWindow::on_actionFST4_triggered()
m_modeTx="FST4"; m_modeTx="FST4";
ui->actionFST4->setChecked(true); ui->actionFST4->setChecked(true);
WSPR_config(false); WSPR_config(false);
bool bVHF=m_config.enable_VHF_features();
// 0123456789012345678901234567890123 // 0123456789012345678901234567890123
displayWidgets(nWidgets("1111110001001110000100000001000000")); displayWidgets(nWidgets("1111110001001110000100000001000000"));
setup_status_bar (bVHF); setup_status_bar(false);
ui->sbTR->values ({15, 30, 60, 120, 300, 900, 1800}); ui->sbTR->values ({15, 30, 60, 120, 300, 900, 1800});
on_sbTR_valueChanged (ui->sbTR->value()); on_sbTR_valueChanged (ui->sbTR->value());
ui->cbAutoSeq->setChecked(true); ui->cbAutoSeq->setChecked(true);
@ -6013,15 +6018,16 @@ void MainWindow::on_actionFST4_triggered()
void MainWindow::on_actionFST4W_triggered() void MainWindow::on_actionFST4W_triggered()
{ {
on_actionFST4_triggered();
m_mode="FST4W"; m_mode="FST4W";
m_modeTx="FST4W"; m_modeTx="FST4W";
m_nsps=6912; //For symspec only
m_FFTSize = m_nsps / 2;
Q_EMIT FFTSize(m_FFTSize);
WSPR_config(true); WSPR_config(true);
ui->actionFST4W->setChecked(true); ui->actionFST4W->setChecked(true);
// 0123456789012345678901234567890123 // 0123456789012345678901234567890123
displayWidgets(nWidgets("0000000000000000010100000000000001")); displayWidgets(nWidgets("0000000000000000010100000000000001"));
bool bVHF=m_config.enable_VHF_features(); setup_status_bar(false);
setup_status_bar (bVHF);
ui->band_hopping_group_box->setChecked(false); ui->band_hopping_group_box->setChecked(false);
ui->band_hopping_group_box->setVisible(false); ui->band_hopping_group_box->setVisible(false);
on_sbTR_FST4W_valueChanged (ui->sbTR_FST4W->value ()); on_sbTR_FST4W_valueChanged (ui->sbTR_FST4W->value ());
@ -6029,6 +6035,8 @@ void MainWindow::on_actionFST4W_triggered()
m_wideGraph->setModeTx(m_modeTx); m_wideGraph->setModeTx(m_modeTx);
m_wideGraph->setPeriod(m_TRperiod,6912); m_wideGraph->setPeriod(m_TRperiod,6912);
m_wideGraph->setTxFreq(ui->WSPRfreqSpinBox->value()); m_wideGraph->setTxFreq(ui->WSPRfreqSpinBox->value());
m_wideGraph->setRxFreq(ui->sbFST4W_RxFreq->value());
m_wideGraph->setTol(ui->sbFST4W_FTol->value());
ui->sbFtol->setValue(100); ui->sbFtol->setValue(100);
ui->RxFreqSpinBox->setValue(1500); ui->RxFreqSpinBox->setValue(1500);
switch_mode (Modes::FST4W); switch_mode (Modes::FST4W);
@ -6644,9 +6652,12 @@ void MainWindow::WSPR_config(bool b)
ui->label_7->setVisible(!b and ui->cbMenus->isChecked()); ui->label_7->setVisible(!b and ui->cbMenus->isChecked());
ui->logQSOButton->setVisible(!b); ui->logQSOButton->setVisible(!b);
ui->DecodeButton->setEnabled(!b); ui->DecodeButton->setEnabled(!b);
ui->sbTxPercent->setEnabled (m_mode != "FST4W" || tr ("Random") == ui->RoundRobin->currentText ()); bool bFST4W=(m_mode=="FST4W");
ui->sbTxPercent->setEnabled(!bFST4W or (tr("Random") == ui->RoundRobin->currentText()));
ui->band_hopping_group_box->setVisible(true); ui->band_hopping_group_box->setVisible(true);
ui->RoundRobin->setVisible(m_mode=="FST4W"); ui->RoundRobin->setVisible(bFST4W);
ui->sbFST4W_RxFreq->setVisible(bFST4W);
ui->sbFST4W_FTol->setVisible(bFST4W);
ui->RoundRobin->lineEdit()->setAlignment(Qt::AlignCenter); ui->RoundRobin->lineEdit()->setAlignment(Qt::AlignCenter);
if(b and m_mode!="Echo" and m_mode!="FST4W") { if(b and m_mode!="Echo" and m_mode!="FST4W") {
QString t="UTC dB DT Freq Drift Call Grid dBm "; QString t="UTC dB DT Freq Drift Call Grid dBm ";
@ -8126,6 +8137,18 @@ void MainWindow::on_WSPRfreqSpinBox_valueChanged(int n)
ui->TxFreqSpinBox->setValue(n); ui->TxFreqSpinBox->setValue(n);
} }
void MainWindow::on_sbFST4W_RxFreq_valueChanged(int n)
{
m_wideGraph->setRxFreq(n);
statusUpdate ();
}
void MainWindow::on_sbFST4W_FTol_valueChanged(int n)
{
m_wideGraph->setTol(n);
statusUpdate ();
}
void MainWindow::on_pbTxNext_clicked(bool b) void MainWindow::on_pbTxNext_clicked(bool b)
{ {
if (b && !ui->autoButton->isChecked ()) if (b && !ui->autoButton->isChecked ())

View File

@ -288,6 +288,8 @@ private slots:
void TxAgain(); void TxAgain();
void uploadResponse(QString response); void uploadResponse(QString response);
void on_WSPRfreqSpinBox_valueChanged(int n); void on_WSPRfreqSpinBox_valueChanged(int n);
void on_sbFST4W_RxFreq_valueChanged(int n);
void on_sbFST4W_FTol_valueChanged(int n);
void on_pbTxNext_clicked(bool b); void on_pbTxNext_clicked(bool b);
void on_actionEcho_Graph_triggered(); void on_actionEcho_Graph_triggered();
void on_actionEcho_triggered(); void on_actionEcho_triggered();

View File

@ -1195,7 +1195,7 @@ When not checked you can view the calibration results.</string>
<enum>QTabWidget::Triangular</enum> <enum>QTabWidget::Triangular</enum>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>1</number>
</property> </property>
<widget class="QWidget" name="tab"> <widget class="QWidget" name="tab">
<attribute name="title"> <attribute name="title">
@ -2159,69 +2159,50 @@ list. The list can be maintained in Settings (F2).</string>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QSpinBox" name="sbTxPercent"> <widget class="QSpinBox" name="sbFST4W_RxFreq">
<property name="toolTip">
<string>Percentage of minute sequences devoted to transmitting.</string>
</property>
<property name="styleSheet">
<string notr="true">QSpinBox:enabled[notx=&quot;true&quot;] {
color: rgb(0, 0, 0);
background-color: rgb(255, 255, 0);
}</string>
</property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignCenter</set> <set>Qt::AlignCenter</set>
</property> </property>
<property name="suffix"> <property name="suffix">
<string> %</string> <string> Hz</string>
</property> </property>
<property name="prefix"> <property name="prefix">
<string>Tx Pct </string> <string>Rx </string>
</property>
<property name="maximum">
<number>100</number>
</property>
</widget>
</item>
<item>
<widget class="RestrictedSpinBox" name="sbTR_FST4W">
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="suffix">
<string> s</string>
</property>
<property name="prefix">
<string>T/R </string>
</property> </property>
<property name="minimum"> <property name="minimum">
<number>15</number> <number>100</number>
</property> </property>
<property name="maximum"> <property name="maximum">
<number>1800</number> <number>4900</number>
</property>
<property name="singleStep">
<number>100</number>
</property>
<property name="value">
<number>1500</number>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QGroupBox" name="band_hopping_group_box"> <widget class="QSpinBox" name="sbFST4W_FTol">
<property name="title"> <property name="alignment">
<string>Band Hopping</string> <set>Qt::AlignCenter</set>
</property> </property>
<property name="checkable"> <property name="suffix">
<bool>true</bool> <string> Hz</string>
</property>
<property name="prefix">
<string>F Tol </string>
</property>
<property name="minimum">
<number>100</number>
</property>
<property name="maximum">
<number>500</number>
</property>
<property name="singleStep">
<number>100</number>
</property> </property>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QPushButton" name="band_hopping_schedule_push_button">
<property name="toolTip">
<string>Choose bands and times of day for band-hopping.</string>
</property>
<property name="text">
<string>Schedule ...</string>
</property>
</widget>
</item>
</layout>
</widget> </widget>
</item> </item>
<item> <item>
@ -2339,6 +2320,72 @@ list. The list can be maintained in Settings (F2).</string>
</item> </item>
</widget> </widget>
</item> </item>
<item>
<widget class="QSpinBox" name="sbTxPercent">
<property name="toolTip">
<string>Percentage of minute sequences devoted to transmitting.</string>
</property>
<property name="styleSheet">
<string notr="true">QSpinBox:enabled[notx=&quot;true&quot;] {
color: rgb(0, 0, 0);
background-color: rgb(255, 255, 0);
}</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="suffix">
<string> %</string>
</property>
<property name="prefix">
<string>Tx Pct </string>
</property>
<property name="maximum">
<number>100</number>
</property>
</widget>
</item>
<item>
<widget class="RestrictedSpinBox" name="sbTR_FST4W">
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="suffix">
<string> s</string>
</property>
<property name="prefix">
<string>T/R </string>
</property>
<property name="minimum">
<number>15</number>
</property>
<property name="maximum">
<number>1800</number>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="band_hopping_group_box">
<property name="title">
<string>Band Hopping</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<item>
<widget class="QPushButton" name="band_hopping_schedule_push_button">
<property name="toolTip">
<string>Choose bands and times of day for band-hopping.</string>
</property>
<property name="text">
<string>Schedule ...</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout> </layout>
</item> </item>
<item> <item>

View File

@ -48,7 +48,8 @@ CPlotter::CPlotter(QWidget *parent) : //CPlotter Constructor
m_Percent2DScreen0 {0}, m_Percent2DScreen0 {0},
m_rxFreq {1020}, m_rxFreq {1020},
m_txFreq {0}, m_txFreq {0},
m_startFreq {0} m_startFreq {0},
m_tol {100}
{ {
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
setFocusPolicy(Qt::StrongFocus); setFocusPolicy(Qt::StrongFocus);
@ -485,8 +486,8 @@ void CPlotter::DrawOverlay() //DrawOverlay()
} }
if(m_mode=="FST4W") { if(m_mode=="FST4W") {
x1=XfromFreq(2600); x1=XfromFreq(m_rxFreq-m_tol);
x2=XfromFreq(2700); x2=XfromFreq(m_rxFreq+m_tol);
painter0.drawLine(x1,26,x2,26); painter0.drawLine(x1,26,x2,26);
} }