Add a user control for Tx Delay, on the Advanced tab.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7058 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2016-09-06 23:18:48 +00:00
parent adce105920
commit b998689171
4 changed files with 43 additions and 7 deletions

View File

@ -517,6 +517,7 @@ private:
qint32 aggressive_; qint32 aggressive_;
qint32 RxBandwidth_; qint32 RxBandwidth_;
double degrade_; double degrade_;
double txDelay_;
bool id_after_73_; bool id_after_73_;
bool tx_QSY_allowed_; bool tx_QSY_allowed_;
bool spot_to_psk_reporter_; bool spot_to_psk_reporter_;
@ -597,6 +598,7 @@ qint32 Configuration::id_interval () const {return m_->id_interval_;}
qint32 Configuration::ntrials() const {return m_->ntrials_;} qint32 Configuration::ntrials() const {return m_->ntrials_;}
qint32 Configuration::aggressive() const {return m_->aggressive_;} qint32 Configuration::aggressive() const {return m_->aggressive_;}
double Configuration::degrade() const {return m_->degrade_;} double Configuration::degrade() const {return m_->degrade_;}
double Configuration::txDelay() const {return m_->txDelay_;}
qint32 Configuration::RxBandwidth() const {return m_->RxBandwidth_;} qint32 Configuration::RxBandwidth() const {return m_->RxBandwidth_;}
bool Configuration::id_after_73 () const {return m_->id_after_73_;} bool Configuration::id_after_73 () const {return m_->id_after_73_;}
bool Configuration::tx_QSY_allowed () const {return m_->tx_QSY_allowed_;} bool Configuration::tx_QSY_allowed () const {return m_->tx_QSY_allowed_;}
@ -1022,6 +1024,7 @@ void Configuration::impl::initialize_models ()
ui_->labNewCall->setStyleSheet(QString("background: %1").arg(color_NewCall_.name())); ui_->labNewCall->setStyleSheet(QString("background: %1").arg(color_NewCall_.name()));
ui_->CW_id_interval_spin_box->setValue (id_interval_); ui_->CW_id_interval_spin_box->setValue (id_interval_);
ui_->sbNtrials->setValue (ntrials_); ui_->sbNtrials->setValue (ntrials_);
ui_->sbTxDelay->setValue (txDelay_);
ui_->sbAggressive->setValue (aggressive_); ui_->sbAggressive->setValue (aggressive_);
ui_->sbDegrade->setValue (degrade_); ui_->sbDegrade->setValue (degrade_);
ui_->sbBandwidth->setValue (RxBandwidth_); ui_->sbBandwidth->setValue (RxBandwidth_);
@ -1150,6 +1153,7 @@ void Configuration::impl::read_settings ()
id_interval_ = settings_->value ("IDint", 0).toInt (); id_interval_ = settings_->value ("IDint", 0).toInt ();
ntrials_ = settings_->value ("nTrials", 6).toInt (); ntrials_ = settings_->value ("nTrials", 6).toInt ();
txDelay_ = settings_->value ("TxDelay",0.2).toDouble();
aggressive_ = settings_->value ("Aggressive", 0).toInt (); aggressive_ = settings_->value ("Aggressive", 0).toInt ();
RxBandwidth_ = settings_->value ("RxBandwidth", 2500).toInt (); RxBandwidth_ = settings_->value ("RxBandwidth", 2500).toInt ();
save_directory_ = settings_->value ("SaveDir", default_save_directory_.absolutePath ()).toString (); save_directory_ = settings_->value ("SaveDir", default_save_directory_.absolutePath ()).toString ();
@ -1301,6 +1305,7 @@ void Configuration::impl::write_settings ()
settings_->setValue ("DecodedTextFont", decoded_text_font_.toString ()); settings_->setValue ("DecodedTextFont", decoded_text_font_.toString ());
settings_->setValue ("IDint", id_interval_); settings_->setValue ("IDint", id_interval_);
settings_->setValue ("nTrials", ntrials_); settings_->setValue ("nTrials", ntrials_);
settings_->setValue ("TxDelay", txDelay_);
settings_->setValue ("Aggressive", aggressive_); settings_->setValue ("Aggressive", aggressive_);
settings_->setValue ("RxBandwidth", RxBandwidth_); settings_->setValue ("RxBandwidth", RxBandwidth_);
settings_->setValue ("PTTMethod", QVariant::fromValue (rig_params_.ptt_type)); settings_->setValue ("PTTMethod", QVariant::fromValue (rig_params_.ptt_type));
@ -1734,6 +1739,7 @@ void Configuration::impl::accept ()
spot_to_psk_reporter_ = ui_->psk_reporter_check_box->isChecked (); spot_to_psk_reporter_ = ui_->psk_reporter_check_box->isChecked ();
id_interval_ = ui_->CW_id_interval_spin_box->value (); id_interval_ = ui_->CW_id_interval_spin_box->value ();
ntrials_ = ui_->sbNtrials->value (); ntrials_ = ui_->sbNtrials->value ();
txDelay_ = ui_->sbTxDelay->value ();
aggressive_ = ui_->sbAggressive->value (); aggressive_ = ui_->sbAggressive->value ();
degrade_ = ui_->sbDegrade->value (); degrade_ = ui_->sbDegrade->value ();
RxBandwidth_ = ui_->sbBandwidth->value (); RxBandwidth_ = ui_->sbBandwidth->value ();

View File

@ -99,6 +99,7 @@ public:
qint32 aggressive() const; qint32 aggressive() const;
qint32 RxBandwidth() const; qint32 RxBandwidth() const;
double degrade() const; double degrade() const;
double txDelay() const;
bool id_after_73 () const; bool id_after_73 () const;
bool tx_QSY_allowed () const; bool tx_QSY_allowed () const;
bool spot_to_psk_reporter () const; bool spot_to_psk_reporter () const;

View File

@ -2240,7 +2240,7 @@ Right click for insert and delete options.</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="3" column="0">
<widget class="QCheckBox" name="cbx2ToneSpacing"> <widget class="QCheckBox" name="cbx2ToneSpacing">
<property name="toolTip"> <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> <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>
@ -2250,6 +2250,35 @@ Right click for insert and delete options.</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="2" column="0">
<widget class="QLabel" name="label_11">
<property name="text">
<string>Tx delay:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="sbTxDelay">
<property name="toolTip">
<string>Minimum delay between assertion of PTT and start of Tx audio.</string>
</property>
<property name="suffix">
<string> s</string>
</property>
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>0.200000000000000</double>
</property>
<property name="maximum">
<double>2.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
</layout> </layout>
@ -2506,12 +2535,12 @@ soundcard changes</string>
</connection> </connection>
</connections> </connections>
<buttongroups> <buttongroups>
<buttongroup name="CAT_handshake_button_group"/> <buttongroup name="TX_audio_source_button_group"/>
<buttongroup name="TX_mode_button_group"/> <buttongroup name="TX_mode_button_group"/>
<buttongroup name="split_mode_button_group"/> <buttongroup name="split_mode_button_group"/>
<buttongroup name="TX_audio_source_button_group"/>
<buttongroup name="CAT_stop_bits_button_group"/>
<buttongroup name="PTT_method_button_group"/> <buttongroup name="PTT_method_button_group"/>
<buttongroup name="CAT_stop_bits_button_group"/>
<buttongroup name="CAT_handshake_button_group"/>
<buttongroup name="CAT_data_bits_button_group"/> <buttongroup name="CAT_data_bits_button_group"/>
</buttongroups> </buttongroups>
</ui> </ui>

View File

@ -2672,8 +2672,8 @@ void MainWindow::guiUpdate()
Q_EMIT m_config.transceiver_tx_frequency (tx_frequency); Q_EMIT m_config.transceiver_tx_frequency (tx_frequency);
} }
Q_EMIT m_config.transceiver_ptt (true); //Assert the PTT Q_EMIT m_config.transceiver_ptt (true); //Assert the PTT
ptt1Timer.start(200); //Sequencer delay ptt1Timer.start(int(1000.0*m_config.txDelay())); //Start-of-transmission sequencer delay
} }
if(!m_bTxTime and !m_tune) m_btxok=false; //Time to stop transmitting if(!m_bTxTime and !m_tune) m_btxok=false; //Time to stop transmitting
} }
@ -3041,7 +3041,7 @@ void MainWindow::stopTx()
tx_status_label.setStyleSheet(""); tx_status_label.setStyleSheet("");
tx_status_label.setText(""); tx_status_label.setText("");
} }
ptt0Timer.start(200); //Sequencer delay ptt0Timer.start(200); //end-of-transmission sequencer delay
monitor (true); monitor (true);
statusUpdate (); statusUpdate ();
} }