Some possibly temporary ideas, playing around with a "FreqCal" mode to do simple frequency calibrations.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7446 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2017-01-03 21:37:38 +00:00
parent 47f782dbe3
commit dbeb21b050
5 changed files with 55 additions and 8 deletions

View File

@ -21,7 +21,8 @@ namespace
"Echo",
"ISCAT",
"MSK144",
"QRA64"
"QRA64",
"FreqCal"
};
std::size_t constexpr mode_names_size = sizeof (mode_names) / sizeof (mode_names[0]);
}

View File

@ -48,6 +48,7 @@ public:
ISCAT,
MSK144,
QRA64,
FreqCal,
MODES_END_SENTINAL_AND_COUNT // this must be last
};
Q_ENUM (Mode)

View File

@ -67,7 +67,7 @@ extern "C" {
int* minw, float* px, float s[], float* df3, int* nhsym, int* npts8);
void hspec_(short int d2[], int* k, int* nutc0, int* ntrperiod, int* nrxfreq, int* ntol,
bool* bmsk144, bool* bcontest, bool* brxequalize, int* ingain, char mycall[],
bool* bmsk144, bool* bcontest, bool* brxequalize, int* ingain, char mycall[],
char hiscall[], bool* bshmsg, bool* bswl, float green[], float s[], int* jh,
char line[], char mygrid[], int len1, int len2, int len3, int len4);
@ -479,6 +479,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
ui->actionISCAT->setActionGroup(modeGroup);
ui->actionMSK144->setActionGroup(modeGroup);
ui->actionQRA64->setActionGroup(modeGroup);
ui->actionFreqCal->setActionGroup(modeGroup);
QActionGroup* saveGroup = new QActionGroup(this);
ui->actionNone->setActionGroup(saveGroup);
@ -676,11 +677,8 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
auto t = "UTC dB DT Freq Message";
ui->decodedTextLabel->setText(t);
ui->decodedTextLabel2->setText(t);
readSettings(); //Restore user's setup params
m_audioThread.start (m_audioThreadPriority);
m_dateTimeDefault=QDateTime(QDate(1900,1,1),QTime(0,0));
m_dateTimeQSOOn=m_dateTimeDefault;
@ -787,11 +785,12 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
if(m_mode=="JT65") on_actionJT65_triggered();
if(m_mode=="JT9+JT65") on_actionJT9_JT65_triggered();
if(m_mode=="WSPR") on_actionWSPR_triggered();
if(m_mode=="Echo") on_actionEcho_triggered();
if(m_mode=="ISCAT") on_actionISCAT_triggered();
if(m_mode=="MSK144") on_actionMSK144_triggered();
if(m_mode=="QRA64") on_actionQRA64_triggered();
if(m_mode=="Echo") monitor(false); //Don't auto-start Monitor in Echo mode.
if(m_mode=="Echo") on_actionEcho_triggered();
if(m_mode=="Echo") monitor(false); //Don't auto-start Monitor in Echo mode.
if(m_mode=="FreqCal") on_actionFreqCal_triggered();
ui->sbSubmode->setValue (vhf ? m_nSubMode : 0);
ui->sbTR->setValue(m_TRindex);
@ -1082,6 +1081,8 @@ void MainWindow::fixStop()
} else if (m_mode=="QRA64"){
m_hsymStop=179;
if(m_config.decode_at_52s()) m_hsymStop=186;
} else if (m_mode=="FreqCal"){
m_hsymStop=100;
}
}
@ -1164,6 +1165,10 @@ void MainWindow::dataSink(qint64 frames)
}
return;
}
if(m_mode=="FreqCal") {
qDebug() << "A" << m_ihsym;
return;
}
if( m_dialFreqRxWSPR==0) m_dialFreqRxWSPR=m_freqNominal;
m_dataAvailable=true;
dec_data.params.npts8=(m_ihsym*m_nsps)/16;
@ -1455,6 +1460,7 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog
if(m_config.enable_VHF_features() != bvhf0) genStdMsgs(m_rpt);
}
if(m_mode=="QRA64") on_actionQRA64_triggered();
if(m_mode=="FreqCal") on_actionFreqCal_triggered();
if(m_mode=="ISCAT") on_actionISCAT_triggered();
if(m_mode=="MSK144") {
on_actionMSK144_triggered();
@ -1817,7 +1823,8 @@ void MainWindow::setup_status_bar (bool vhf)
mode_label.setStyleSheet ("QLabel{background-color: #99ff33}");
} else if ("MSK144" == m_mode) {
mode_label.setStyleSheet ("QLabel{background-color: #ff6666}");
}
} else if ("FreqCal" == m_mode) {
mode_label.setStyleSheet ("QLabel{background-color: #ff9933}"); }
last_tx_label.setText (QString {});
if (m_mode.contains (QRegularExpression {R"(^(Echo|ISCAT))"})) {
if (band_hopping_label.isVisible ()) statusBar ()->removeWidget (&band_hopping_label);
@ -4499,6 +4506,33 @@ void MainWindow::on_actionEcho_triggered()
statusChanged();
}
void MainWindow::on_actionFreqCal_triggered()
{
on_actionEcho_triggered();
if(m_echoGraph->isVisible()) m_echoGraph->hide();
if(ui->actionAstronomical_data->isChecked()) {
ui->actionAstronomical_data->setChecked (false);
}
m_mode="FreqCal";
displayWidgets(nWidgets("000000000000000000000000"));
ui->actionFreqCal->setChecked(true);
m_TRperiod=30;
m_modulator->setPeriod(m_TRperiod); // TODO - not thread safe
m_detector->setPeriod(m_TRperiod); // TODO - not thread safe
m_nsps=6912; //For symspec only
m_FFTSize = m_nsps / 2;
Q_EMIT FFTSize (m_FFTSize);
m_hsymStop=100;
switch_mode(Modes::FreqCal);
setup_status_bar (true);
m_wideGraph->setMode(m_mode);
m_bFastMode=true;
m_bFast9=false;
fast_config(false);
// WSPR_config(true);
ui->decodedTextLabel->setText(" UTC N Level Sig DF Width Q");
statusChanged();
}
void MainWindow::switch_mode (Mode mode)
{

View File

@ -255,6 +255,7 @@ private slots:
void on_cbCQTx_toggled(bool b);
void on_actionMSK144_triggered();
void on_actionQRA64_triggered();
void on_actionFreqCal_triggered();
void splash_done ();
private:

View File

@ -2439,6 +2439,8 @@ QPushButton[state=&quot;ok&quot;] {
<addaction name="actionWSPR"/>
<addaction name="separator"/>
<addaction name="actionEcho"/>
<addaction name="separator"/>
<addaction name="actionFreqCal"/>
</widget>
<widget class="QMenu" name="menuConfig">
<property name="title">
@ -2940,6 +2942,14 @@ QPushButton[state=&quot;ok&quot;] {
<string>Ctrl+M</string>
</property>
</action>
<action name="actionFreqCal">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>FreqCal</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>