Add MSK144 "Contest mode" option to skip Tx2 and Tx3. Needs checking!

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7070 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2016-09-09 18:37:00 +00:00
parent 05c19aecd2
commit 73612cf6a5
4 changed files with 36 additions and 19 deletions

View File

@ -539,6 +539,7 @@ private:
bool single_decode_;
bool twoPass_;
bool x2ToneSpacing_;
bool contestMode_;
bool offsetRxFreq_;
QString udp_server_name_;
port_type udp_server_port_;
@ -624,6 +625,7 @@ bool Configuration::decode_at_52s () const {return m_->decode_at_52s_;}
bool Configuration::single_decode () const {return m_->single_decode_;}
bool Configuration::twoPass() const {return m_->twoPass_;}
bool Configuration::x2ToneSpacing() const {return m_->x2ToneSpacing_;}
bool Configuration::contestMode() const {return m_->contestMode_;}
bool Configuration::offsetRxFreq () const {return m_->offsetRxFreq_;}
bool Configuration::split_mode () const {return m_->split_mode ();}
QString Configuration::udp_server_name () const {return m_->udp_server_name_;}
@ -1050,6 +1052,7 @@ void Configuration::impl::initialize_models ()
ui_->single_decode_check_box->setChecked(single_decode_);
ui_->cbTwoPass->setChecked(twoPass_);
ui_->cbx2ToneSpacing->setChecked(x2ToneSpacing_);
ui_->cbContestMode->setChecked(contestMode_);
ui_->offset_Rx_freq_check_box->setChecked(offsetRxFreq_);
ui_->type_2_msg_gen_combo_box->setCurrentIndex (type_2_msg_gen_);
ui_->rig_combo_box->setCurrentText (rig_params_.rig_name);
@ -1274,6 +1277,7 @@ void Configuration::impl::read_settings ()
single_decode_ = settings_->value("SingleDecode",false).toBool ();
twoPass_ = settings_->value("TwoPass",true).toBool ();
x2ToneSpacing_ = settings_->value("x2ToneSpacing",false).toBool ();
contestMode_ = settings_->value("ContestMode",false).toBool ();
offsetRxFreq_ = settings_->value("OffsetRx",false).toBool();
rig_params_.poll_interval = settings_->value ("Polling", 0).toInt ();
rig_params_.split_mode = settings_->value ("SplitMode", QVariant::fromValue (TransceiverFactory::split_mode_none)).value<TransceiverFactory::SplitMode> ();
@ -1370,6 +1374,7 @@ void Configuration::impl::write_settings ()
settings_->setValue ("SingleDecode", single_decode_);
settings_->setValue ("TwoPass", twoPass_);
settings_->setValue ("x2ToneSpacing", x2ToneSpacing_);
settings_->setValue ("ContestMode", contestMode_);
settings_->setValue("OffsetRx",offsetRxFreq_);
settings_->setValue ("UDPServer", udp_server_name_);
settings_->setValue ("UDPServerPort", udp_server_port_);
@ -1762,6 +1767,7 @@ void Configuration::impl::accept ()
single_decode_ = ui_->single_decode_check_box->isChecked ();
twoPass_ = ui_->cbTwoPass->isChecked ();
x2ToneSpacing_ = ui_->cbx2ToneSpacing->isChecked ();
contestMode_ = ui_->cbContestMode->isChecked ();
offsetRxFreq_ = ui_->offset_Rx_freq_check_box->isChecked();
frequency_calibration_intercept_ = ui_->calibration_intercept_spin_box->value ();
frequency_calibration_slope_ppm_ = ui_->calibration_slope_ppm_spin_box->value ();

View File

@ -122,6 +122,7 @@ public:
bool single_decode () const;
bool twoPass() const;
bool x2ToneSpacing() const;
bool contestMode() const;
bool MyDx() const;
bool CQMyN() const;
bool NDxG() const;

View File

@ -2240,7 +2240,7 @@ Right click for insert and delete options.</string>
</property>
</widget>
</item>
<item row="3" column="0">
<item row="4" column="0">
<widget class="QCheckBox" name="cbx2ToneSpacing">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Generate Tx audio with twice the normal tone spacing. Intended for special LF/MF transmitters that use a divide-by-2 before generating RF.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
@ -2279,6 +2279,13 @@ Right click for insert and delete options.</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="cbContestMode">
<property name="text">
<string>Context Mode</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
@ -2527,12 +2534,12 @@ soundcard changes</string>
</connection>
</connections>
<buttongroups>
<buttongroup name="PTT_method_button_group"/>
<buttongroup name="TX_mode_button_group"/>
<buttongroup name="CAT_stop_bits_button_group"/>
<buttongroup name="CAT_handshake_button_group"/>
<buttongroup name="CAT_data_bits_button_group"/>
<buttongroup name="TX_mode_button_group"/>
<buttongroup name="split_mode_button_group"/>
<buttongroup name="PTT_method_button_group"/>
<buttongroup name="TX_audio_source_button_group"/>
<buttongroup name="split_mode_button_group"/>
</buttongroups>
</ui>

View File

@ -918,7 +918,7 @@ void MainWindow::writeSettings()
m_settings->setValue("DTtol",m_DTtol);
m_settings->setValue("FtolIndex",m_FtolIndex);
m_settings->setValue("MinSync",m_minSync);
m_settings->setValue("EME",m_bAutoSeq);
m_settings->setValue("AutoSeq",m_bAutoSeq);
m_settings->setValue("ShMsgs",m_bShMsgs);
m_settings->setValue ("DialFreq", QVariant::fromValue(m_lastMonitoredFrequency));
m_settings->setValue("InGain",m_inGain);
@ -973,7 +973,7 @@ void MainWindow::readSettings()
m_FtolIndex=m_settings->value("FtolIndex",21).toInt();
// ui->FTol_combo_box->setCurrentText(m_settings->value("FTol","500").toString ());
ui->syncSpinBox->setValue(m_settings->value("MinSync",0).toInt());
m_bAutoSeq=m_settings->value("EME",false).toBool();
m_bAutoSeq=m_settings->value("AutoSeq",false).toBool();
m_bShMsgs=m_settings->value("ShMsgs",false).toBool();
m_bFast9=m_settings->value("Fast9",false).toBool();
m_bFastMode=m_settings->value("FastMode",false).toBool();
@ -2244,7 +2244,7 @@ void::MainWindow::fast_decode_done()
int i1=msg0.indexOf(m_baseCall);
int i2=msg0.indexOf(m_hisCall);
if((m_mode=="JTMSK" or m_mode=="MSK144" or m_bFast9) and m_bAutoSeq and tmax>=0.0 and
i1>10 and i2>i1+3) { //Here, "m_bAutoSeq" implies AutoSeq
i1>10 and i2>i1+3) {
if((msg0.indexOf(" 73") < 0) or (m_ntx!=6)) processMessage(msg0,43,false);
}
if(m_msg[i][0]==0) break;
@ -3177,18 +3177,17 @@ void MainWindow::doubleClickOnCall(bool shift, bool ctrl)
void MainWindow::processMessage(QString const& messages, int position, bool ctrl)
{
QString t1 = messages.mid(0,position); //contents up to \n on selected line
int i1=t1.lastIndexOf("\n") + 1; //points to first char of line
QString t1 = messages.mid(0,position); //contents up to \n on selected line
int i1=t1.lastIndexOf("\n") + 1; //points to first char of line
DecodedText decodedtext;
QString t2 = messages.mid(i1,position-i1); //selected line
QString t2 = messages.mid(i1,position-i1); //selected line
QString t2a;
int ntsec=3600*t2.mid(0,2).toInt() + 60*t2.mid(2,2).toInt();
if(m_bFast9) {
ntsec = ntsec + t2.mid(4,2).toInt();
t2a=t2.mid(0,4) + t2.mid(6,-1); //Change hhmmss to hhmm for the message parser
} else {
t2a=t2.left (44); // strip and quality info trailing the
// decoded message
t2a=t2.left (44); // strip and quality info trailing the decoded message
}
if(m_bFast9) {
i1=t2a.indexOf(" CQ ");
@ -3236,7 +3235,7 @@ void MainWindow::processMessage(QString const& messages, int position, bool ctrl
int frequency = decodedtext.frequencyOffset();
if (ui->RxFreqSpinBox->isEnabled ())
{
ui->RxFreqSpinBox->setValue (frequency); //Set Rx freq
ui->RxFreqSpinBox->setValue (frequency); //Set Rx freq
}
if (decodedtext.isTX())
{
@ -3254,8 +3253,8 @@ void MainWindow::processMessage(QString const& messages, int position, bool ctrl
QString hiscall;
QString hisgrid;
decodedtext.deCallAndGrid(/*out*/hiscall,hisgrid);
if (!Radio::is_callsign (hiscall) // not interested if not from QSO partner
&& !(t4.size () == 7 // unless it is of the form
if (!Radio::is_callsign (hiscall) // not interested if not from QSO partner
&& !(t4.size () == 7 // unless it is of the form
&& (t4.at (5) == m_baseCall // "<our-call> 73"
|| t4.at (5).startsWith (m_baseCall + '/')
|| t4.at (5).endsWith ('/' + m_baseCall))
@ -3400,10 +3399,14 @@ void MainWindow::processMessage(QString const& messages, int position, bool ctrl
m_ntx=7;
ui->rbGenMsg->setChecked(true);
}
}
else {
m_ntx=2;
ui->txrb2->setChecked(true);
} else {
if(m_mode=="MSK144" and m_config.contestMode()) {
m_ntx=4;
ui->txrb4->setChecked(true);
} else {
m_ntx=2;
ui->txrb2->setChecked(true);
}
if(ui->tabWidget->currentIndex()==1) {
ui->genMsg->setText(ui->tx2->text());
m_ntx=7;