From bbc359d04326bf8baf48467e1fd8cac7b2bc259c Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Tue, 14 Apr 2015 10:54:14 +0000 Subject: [PATCH] Improved DTR and RTS line control Made the force control lines group box in the Configuration UI checkable which allows the DTR and RTS checkboxes to mean either force low or force high. Also improved UI control logic to only allow valid setting combintions. Disabled network port text edit for OmniRig. Cleared network port combo box list for network interfaces like HRD and DXLab Commander, was erroneously showing COM ports. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5222 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- Configuration.cpp | 140 ++++++++++++++++++++++++----------------- Configuration.ui | 24 ++++--- HamlibTransceiver.cpp | 13 ++-- HamlibTransceiver.hpp | 4 +- TransceiverFactory.cpp | 27 ++++---- TransceiverFactory.hpp | 14 +++-- 6 files changed, 127 insertions(+), 95 deletions(-) diff --git a/Configuration.cpp b/Configuration.cpp index 4d6f0fd8c..2101cea5d 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -347,8 +347,9 @@ struct RigParams TransceiverFactory::DataBits CAT_data_bits_; TransceiverFactory::StopBits CAT_stop_bits_; TransceiverFactory::Handshake CAT_handshake_; - bool CAT_DTR_always_on_; - bool CAT_RTS_always_on_; + bool CAT_force_control_lines_; + bool CAT_DTR_high_; + bool CAT_RTS_high_; qint32 CAT_poll_interval_; TransceiverFactory::PTTMethod PTT_method_; QString PTT_port_; @@ -424,6 +425,7 @@ private: Q_SLOT void on_split_mode_button_group_buttonClicked (int); Q_SLOT void on_test_CAT_push_button_clicked (); Q_SLOT void on_test_PTT_push_button_clicked (); + Q_SLOT void on_CAT_control_lines_group_box_toggled (bool); Q_SLOT void on_CAT_DTR_check_box_toggled (bool); Q_SLOT void on_CAT_RTS_check_box_toggled (bool); Q_SLOT void on_rig_combo_box_currentIndexChanged (int); @@ -1028,8 +1030,9 @@ void Configuration::impl::initialise_models () ui_->CAT_data_bits_button_group->button (rig_params_.CAT_data_bits_)->setChecked (true); ui_->CAT_stop_bits_button_group->button (rig_params_.CAT_stop_bits_)->setChecked (true); ui_->CAT_handshake_button_group->button (rig_params_.CAT_handshake_)->setChecked (true); - ui_->CAT_DTR_check_box->setChecked (rig_params_.CAT_DTR_always_on_); - ui_->CAT_RTS_check_box->setChecked (rig_params_.CAT_RTS_always_on_); + ui_->CAT_control_lines_group_box->setChecked (rig_params_.CAT_force_control_lines_); + ui_->CAT_DTR_check_box->setChecked (rig_params_.CAT_DTR_high_); + ui_->CAT_RTS_check_box->setChecked (rig_params_.CAT_RTS_high_); ui_->TX_audio_source_button_group->button (rig_params_.TX_audio_source_)->setChecked (true); ui_->CAT_poll_interval_spin_box->setValue (rig_params_.CAT_poll_interval_); @@ -1190,8 +1193,9 @@ void Configuration::impl::read_settings () rig_params_.CAT_data_bits_ = settings_->value ("CATDataBits", QVariant::fromValue (TransceiverFactory::eight_data_bits)).value (); rig_params_.CAT_stop_bits_ = settings_->value ("CATStopBits", QVariant::fromValue (TransceiverFactory::two_stop_bits)).value (); rig_params_.CAT_handshake_ = settings_->value ("CATHandshake", QVariant::fromValue (TransceiverFactory::handshake_none)).value (); - rig_params_.CAT_DTR_always_on_ = settings_->value ("DTR", false).toBool (); - rig_params_.CAT_RTS_always_on_ = settings_->value ("RTS", false).toBool (); + rig_params_.CAT_force_control_lines_ = settings_->value ("CATForceControlLines", false).toBool (); + rig_params_.CAT_DTR_high_ = settings_->value ("DTR", false).toBool (); + rig_params_.CAT_RTS_high_ = settings_->value ("RTS", false).toBool (); rig_params_.PTT_method_ = settings_->value ("PTTMethod", QVariant::fromValue (TransceiverFactory::PTT_method_VOX)).value (); rig_params_.TX_audio_source_ = settings_->value ("TXAudioSource", QVariant::fromValue (TransceiverFactory::TX_audio_source_front)).value (); rig_params_.PTT_port_ = settings_->value ("PTTport").toString (); @@ -1278,8 +1282,9 @@ void Configuration::impl::write_settings () settings_->setValue ("73TxDisable", disable_TX_on_73_); settings_->setValue ("Runaway", watchdog_); settings_->setValue ("Tx2QSO", TX_messages_); - settings_->setValue ("DTR", rig_params_.CAT_DTR_always_on_); - settings_->setValue ("RTS", rig_params_.CAT_RTS_always_on_); + settings_->setValue ("CATForceControlLines", rig_params_.CAT_force_control_lines_); + settings_->setValue ("DTR", rig_params_.CAT_DTR_high_); + settings_->setValue ("RTS", rig_params_.CAT_RTS_high_); settings_->setValue ("TXAudioSource", QVariant::fromValue (rig_params_.TX_audio_source_)); settings_->setValue ("Polling", rig_params_.CAT_poll_interval_); settings_->setValue ("SplitMode", QVariant::fromValue (rig_params_.split_mode_)); @@ -1294,6 +1299,8 @@ void Configuration::impl::set_rig_invariants () auto CAT_PTT_enabled = transceiver_factory_.has_CAT_PTT (rig); auto CAT_indirect_serial_PTT = transceiver_factory_.has_CAT_indirect_serial_PTT (rig); auto asynchronous_CAT = transceiver_factory_.has_asynchronous_CAT (rig); + auto is_hw_handshake = ui_->CAT_handshake_group_box->isEnabled () + && TransceiverFactory::handshake_hardware == static_cast (ui_->CAT_handshake_button_group->checkedId ()); ui_->test_CAT_push_button->setStyleSheet ({}); @@ -1305,52 +1312,55 @@ void Configuration::impl::set_rig_invariants () bool is_serial_CAT (TransceiverFactory::Capabilities::serial == port_type); - if (port_type != last_port_type) + if (TransceiverFactory::basic_transceiver_name_ == rig) { - last_port_type = port_type; - - switch (port_type) + ui_->CAT_control_group_box->setEnabled (false); + } + else + { + ui_->CAT_control_group_box->setEnabled (true); + if (port_type != last_port_type) { - case TransceiverFactory::Capabilities::serial: - fill_port_combo_box (ui_->CAT_port_combo_box); - ui_->CAT_port_combo_box->setCurrentText (rig_params_.CAT_serial_port_); - if (ui_->CAT_port_combo_box->currentText ().isEmpty () && ui_->CAT_port_combo_box->count ()) + last_port_type = port_type; + switch (port_type) { - ui_->CAT_port_combo_box->setCurrentText (ui_->CAT_port_combo_box->itemText (0)); + case TransceiverFactory::Capabilities::serial: + fill_port_combo_box (ui_->CAT_port_combo_box); + ui_->CAT_port_combo_box->setCurrentText (rig_params_.CAT_serial_port_); + if (ui_->CAT_port_combo_box->currentText ().isEmpty () && ui_->CAT_port_combo_box->count ()) + { + ui_->CAT_port_combo_box->setCurrentText (ui_->CAT_port_combo_box->itemText (0)); + } + ui_->CAT_port_label->setText (tr ("Serial Port:")); + ui_->CAT_port_combo_box->setToolTip (tr ("Serial port used for CAT control")); + ui_->CAT_port_combo_box->setEnabled (true); + break; + + case TransceiverFactory::Capabilities::network: + ui_->CAT_port_combo_box->setCurrentText (rig_params_.CAT_network_port_); + ui_->CAT_port_label->setText (tr ("Network Server:")); + ui_->CAT_port_combo_box->setToolTip (tr ("Optional hostname and port of network service.\n" + "Leave blank for a sensible default on this machine.\n" + "Formats:\n" + "\thostname:port\n" + "\tIPv4-address:port\n" + "\t[IPv6-address]:port")); + ui_->CAT_port_combo_box->clear (); + ui_->CAT_port_combo_box->setEnabled (true); + break; + + default: + ui_->CAT_port_combo_box->clear (); + ui_->CAT_port_combo_box->setEnabled (false); + break; } - - ui_->CAT_control_group_box->setEnabled (true); - ui_->CAT_port_label->setText (tr ("Serial Port:")); - ui_->CAT_port_combo_box->setToolTip (tr ("Serial port used for CAT control")); - break; - - case TransceiverFactory::Capabilities::network: - ui_->CAT_port_combo_box->setCurrentText (rig_params_.CAT_network_port_); - - ui_->CAT_control_group_box->setEnabled (true); - ui_->CAT_port_label->setText (tr ("Network Server:")); - ui_->CAT_port_combo_box->setToolTip (tr ("Optional hostname and port of network service.\n" - "Leave blank for a sensible default on this machine.\n" - "Formats:\n" - "\thostname:port\n" - "\tIPv4-address:port\n" - "\t[IPv6-address]:port")); - break; - - default: - ui_->CAT_port_combo_box->clear (); - ui_->CAT_control_group_box->setEnabled (false); - break; } + ui_->CAT_serial_port_parameters_group_box->setEnabled (is_serial_CAT); + ui_->CAT_control_lines_group_box->setEnabled (is_serial_CAT && !is_hw_handshake); } auto const& cat_port = ui_->CAT_port_combo_box->currentText (); - ui_->CAT_serial_port_parameters_group_box->setEnabled (is_serial_CAT); - - auto is_hw_handshake = TransceiverFactory::handshake_hardware == static_cast (ui_->CAT_handshake_button_group->checkedId ()); - ui_->CAT_RTS_check_box->setEnabled (is_serial_CAT && !is_hw_handshake); - ui_->TX_audio_source_group_box->setEnabled (transceiver_factory_.has_CAT_PTT_mic_data (rig) && TransceiverFactory::PTT_method_CAT == ptt_method); // if (ui_->test_PTT_push_button->isEnabled ()) // don't enable if disabled - "Test CAT" must succeed first @@ -1372,13 +1382,15 @@ void Configuration::impl::set_rig_invariants () , CAT_indirect_serial_PTT ? combo_box_item_enabled : combo_box_item_disabled , Qt::UserRole - 1); - ui_->PTT_DTR_radio_button->setEnabled (!(ui_->CAT_DTR_check_box->isChecked () - && ((is_serial_CAT && ptt_port == cat_port) - || ("CAT" == ptt_port && !CAT_indirect_serial_PTT)))); + auto control_lines_available = !ui_->CAT_control_lines_group_box->isEnabled () + || !ui_->CAT_control_lines_group_box->isChecked (); + ui_->PTT_DTR_radio_button->setEnabled (!(((is_serial_CAT && ptt_port == cat_port) + && !control_lines_available) + || ("CAT" == ptt_port && !CAT_indirect_serial_PTT))); - ui_->PTT_RTS_radio_button->setEnabled (!((ui_->CAT_RTS_check_box->isChecked () || is_hw_handshake) - && ((ptt_port == cat_port && is_serial_CAT) - || ("CAT" == ptt_port && !CAT_indirect_serial_PTT)))); + ui_->PTT_RTS_radio_button->setEnabled (!(((is_serial_CAT && ptt_port == cat_port) + && (!control_lines_available || is_hw_handshake)) + || ("CAT" == ptt_port && !CAT_indirect_serial_PTT))); } bool Configuration::impl::validate () @@ -1476,8 +1488,9 @@ void Configuration::impl::accept () temp_rig_params.CAT_data_bits_ = static_cast (ui_->CAT_data_bits_button_group->checkedId ()); temp_rig_params.CAT_stop_bits_ = static_cast (ui_->CAT_stop_bits_button_group->checkedId ()); temp_rig_params.CAT_handshake_ = static_cast (ui_->CAT_handshake_button_group->checkedId ()); - temp_rig_params.CAT_DTR_always_on_ = ui_->CAT_DTR_check_box->isChecked (); - temp_rig_params.CAT_RTS_always_on_ = ui_->CAT_RTS_check_box->isChecked (); + temp_rig_params.CAT_force_control_lines_ = ui_->CAT_control_lines_group_box->isChecked (); + temp_rig_params.CAT_DTR_high_ = ui_->CAT_DTR_check_box->isChecked (); + temp_rig_params.CAT_RTS_high_ = ui_->CAT_RTS_check_box->isChecked (); temp_rig_params.CAT_poll_interval_ = ui_->CAT_poll_interval_spin_box->value (); temp_rig_params.PTT_method_ = static_cast (ui_->PTT_method_button_group->checkedId ()); temp_rig_params.PTT_port_ = ui_->PTT_port_combo_box->currentText (); @@ -1825,6 +1838,11 @@ void Configuration::impl::on_test_PTT_push_button_clicked () : ""); } +void Configuration::impl::on_CAT_control_lines_group_box_toggled (bool /* checked */) +{ + set_rig_invariants (); +} + void Configuration::impl::on_CAT_DTR_check_box_toggled (bool /* checked */) { set_rig_invariants (); @@ -1984,14 +2002,21 @@ bool Configuration::impl::open_rig () close_rig (); // create a new Transceiver object + TransceiverFactory::LineControl DTR {TransceiverFactory::no_control}; + TransceiverFactory::LineControl RTS {TransceiverFactory::no_control}; + if (ui_->CAT_control_lines_group_box->isChecked ()) + { + DTR = ui_->CAT_DTR_check_box->isEnabled () && ui_->CAT_DTR_check_box->isChecked () ? TransceiverFactory::force_high : TransceiverFactory::force_low; + RTS = ui_->CAT_RTS_check_box->isEnabled () && ui_->CAT_RTS_check_box->isChecked () ? TransceiverFactory::force_high : TransceiverFactory::force_low; + } auto rig = transceiver_factory_.create (ui_->rig_combo_box->currentText () , ui_->CAT_port_combo_box->currentText () , ui_->CAT_serial_baud_combo_box->currentText ().toInt () , static_cast (ui_->CAT_data_bits_button_group->checkedId ()) , static_cast (ui_->CAT_stop_bits_button_group->checkedId ()) , static_cast (ui_->CAT_handshake_button_group->checkedId ()) - , ui_->CAT_DTR_check_box->isChecked () - , ui_->CAT_RTS_check_box->isChecked () + , DTR + , RTS , static_cast (ui_->PTT_method_button_group->checkedId ()) , static_cast (ui_->TX_audio_source_button_group->checkedId ()) , static_cast (ui_->split_mode_button_group->checkedId ()) @@ -2412,8 +2437,9 @@ bool operator != (RigParams const& lhs, RigParams const& rhs) || lhs.CAT_data_bits_ != rhs.CAT_data_bits_ || lhs.CAT_stop_bits_ != rhs.CAT_stop_bits_ || lhs.CAT_handshake_ != rhs.CAT_handshake_ - || lhs.CAT_DTR_always_on_ != rhs.CAT_DTR_always_on_ - || lhs.CAT_RTS_always_on_ != rhs.CAT_RTS_always_on_ + || lhs.CAT_force_control_lines_ != rhs.CAT_force_control_lines_ + || lhs.CAT_DTR_high_ != rhs.CAT_DTR_high_ + || lhs.CAT_RTS_high_ != rhs.CAT_RTS_high_ || lhs.CAT_poll_interval_ != rhs.CAT_poll_interval_ || lhs.PTT_method_ != rhs.PTT_method_ || lhs.PTT_port_ != rhs.PTT_port_ diff --git a/Configuration.ui b/Configuration.ui index e9b6cd3e3..3153d9c24 100644 --- a/Configuration.ui +++ b/Configuration.ui @@ -673,14 +673,17 @@ a few, particularly some Kenwood rigs, require it). Force Control Lines + + true + + + false + - Force the DTR control line high on the CAT serial port. -This is required for a few CAT interfaces that are powered -from the DTR control line. -Normally you should leave this unchecked. + <html><head/><body><p>Force the DTR control linelow or high on the CAT serial port.</p><p>This is required for a few CAT interfaces that are powered</p><p>from the DTR control line.</p><p>Normally you should leave this unchecked.</p></body></html> DTR @@ -690,12 +693,7 @@ Normally you should leave this unchecked. - Force the RTS control line high on the CAT serial port. -This is required for a few CAT interfaces that are powered -from the RTS control line. -Normally you should leave this unchecked. -This option is only available if Hardware handshaking is not -selected above. + <html><head/><body><p>Force the RTS control line low or high on the CAT serial port.</p><p>This is required for a few CAT interfaces that are powered</p><p>from the RTS control line.</p><p>Normally you should leave this unchecked.</p><p>This option is only available if Hardware handshaking is not</p><p>selected above.</p></body></html> RTS @@ -2116,12 +2114,12 @@ soundcard changes + + - - - + diff --git a/HamlibTransceiver.cpp b/HamlibTransceiver.cpp index 093510b8d..b1529eee3 100644 --- a/HamlibTransceiver.cpp +++ b/HamlibTransceiver.cpp @@ -157,8 +157,8 @@ HamlibTransceiver::HamlibTransceiver (int model_number , TransceiverFactory::DataBits cat_data_bits , TransceiverFactory::StopBits cat_stop_bits , TransceiverFactory::Handshake cat_handshake - , bool cat_dtr_always_on - , bool cat_rts_always_on + , TransceiverFactory::LineControl cat_dtr_control + , TransceiverFactory::LineControl cat_rts_control , TransceiverFactory::PTTMethod ptt_type , TransceiverFactory::TXAudioSource back_ptt_port , QString const& ptt_port @@ -193,13 +193,14 @@ HamlibTransceiver::HamlibTransceiver (int model_number case TransceiverFactory::handshake_hardware: set_conf ("serial_handshake", "Hardware"); break; } - if (cat_dtr_always_on) + if (TransceiverFactory::no_control != cat_dtr_control) { - set_conf ("dtr_state", "ON"); + set_conf ("dtr_state", TransceiverFactory::force_high == cat_dtr_control ? "ON" : "OFF"); } - if (TransceiverFactory::handshake_hardware != cat_handshake && cat_rts_always_on) + if (TransceiverFactory::handshake_hardware != cat_handshake + && TransceiverFactory::no_control != cat_rts_control) { - set_conf ("rts_state", "ON"); + set_conf ("rts_state", TransceiverFactory::force_high == cat_rts_control ? "ON" : "OFF"); } switch (ptt_type) diff --git a/HamlibTransceiver.hpp b/HamlibTransceiver.hpp index dfa26019e..20860b870 100644 --- a/HamlibTransceiver.hpp +++ b/HamlibTransceiver.hpp @@ -32,8 +32,8 @@ class HamlibTransceiver final , TransceiverFactory::DataBits cat_data_bits , TransceiverFactory::StopBits cat_stop_bits , TransceiverFactory::Handshake cat_handshake - , bool cat_dtr_always_on - , bool cat_rts_always_on + , TransceiverFactory::LineControl cat_dtr_control + , TransceiverFactory::LineControl cat_rts_control , TransceiverFactory::PTTMethod ptt_type , TransceiverFactory::TXAudioSource back_ptt_port , QString const& ptt_port diff --git a/TransceiverFactory.cpp b/TransceiverFactory.cpp index 337e6f36a..9e774f93a 100644 --- a/TransceiverFactory.cpp +++ b/TransceiverFactory.cpp @@ -100,8 +100,8 @@ std::unique_ptr TransceiverFactory::create (QString const& name , DataBits cat_data_bits , StopBits cat_stop_bits , Handshake cat_handshake - , bool cat_dtr_always_on - , bool cat_rts_always_on + , LineControl cat_dtr_control + , LineControl cat_rts_control , PTTMethod ptt_type , TXAudioSource ptt_use_data_ptt , SplitMode split_mode @@ -124,8 +124,8 @@ std::unique_ptr TransceiverFactory::create (QString const& name , cat_data_bits , cat_stop_bits , cat_handshake - , cat_dtr_always_on - , cat_rts_always_on + , force_low + , force_low , ptt_type , ptt_use_data_ptt , "CAT" == ptt_port ? "" : ptt_port @@ -156,8 +156,8 @@ std::unique_ptr TransceiverFactory::create (QString const& name , cat_data_bits , cat_stop_bits , cat_handshake - , cat_dtr_always_on - , cat_rts_always_on + , cat_dtr_control + , cat_rts_control , ptt_type , ptt_use_data_ptt , "CAT" == ptt_port ? "" : ptt_port @@ -189,8 +189,8 @@ std::unique_ptr TransceiverFactory::create (QString const& name , cat_data_bits , cat_stop_bits , cat_handshake - , cat_dtr_always_on - , cat_rts_always_on + , cat_dtr_control + , cat_rts_control , ptt_type , ptt_use_data_ptt , "CAT" == ptt_port ? "" : ptt_port @@ -221,8 +221,8 @@ std::unique_ptr TransceiverFactory::create (QString const& name , cat_data_bits , cat_stop_bits , cat_handshake - , cat_dtr_always_on - , cat_rts_always_on + , cat_dtr_control + , cat_rts_control , ptt_type , ptt_use_data_ptt , "CAT" == ptt_port ? "" : ptt_port @@ -251,8 +251,8 @@ std::unique_ptr TransceiverFactory::create (QString const& name , cat_data_bits , cat_stop_bits , cat_handshake - , cat_dtr_always_on - , cat_rts_always_on + , cat_dtr_control + , cat_rts_control , ptt_type , ptt_use_data_ptt , "CAT" == ptt_port ? cat_port : ptt_port @@ -282,6 +282,7 @@ std::unique_ptr TransceiverFactory::create (QString const& name ENUM_QDEBUG_OPS_IMPL (TransceiverFactory, DataBits); ENUM_QDEBUG_OPS_IMPL (TransceiverFactory, StopBits); ENUM_QDEBUG_OPS_IMPL (TransceiverFactory, Handshake); +ENUM_QDEBUG_OPS_IMPL (TransceiverFactory, LineControl); ENUM_QDEBUG_OPS_IMPL (TransceiverFactory, PTTMethod); ENUM_QDEBUG_OPS_IMPL (TransceiverFactory, TXAudioSource); ENUM_QDEBUG_OPS_IMPL (TransceiverFactory, SplitMode); @@ -290,6 +291,7 @@ ENUM_QDEBUG_OPS_IMPL (TransceiverFactory, SplitMode); ENUM_QDATASTREAM_OPS_IMPL (TransceiverFactory, DataBits); ENUM_QDATASTREAM_OPS_IMPL (TransceiverFactory, StopBits); ENUM_QDATASTREAM_OPS_IMPL (TransceiverFactory, Handshake); +ENUM_QDATASTREAM_OPS_IMPL (TransceiverFactory, LineControl); ENUM_QDATASTREAM_OPS_IMPL (TransceiverFactory, PTTMethod); ENUM_QDATASTREAM_OPS_IMPL (TransceiverFactory, TXAudioSource); ENUM_QDATASTREAM_OPS_IMPL (TransceiverFactory, SplitMode); @@ -297,6 +299,7 @@ ENUM_QDATASTREAM_OPS_IMPL (TransceiverFactory, SplitMode); ENUM_CONVERSION_OPS_IMPL (TransceiverFactory, DataBits); ENUM_CONVERSION_OPS_IMPL (TransceiverFactory, StopBits); ENUM_CONVERSION_OPS_IMPL (TransceiverFactory, Handshake); +ENUM_CONVERSION_OPS_IMPL (TransceiverFactory, LineControl); ENUM_CONVERSION_OPS_IMPL (TransceiverFactory, PTTMethod); ENUM_CONVERSION_OPS_IMPL (TransceiverFactory, TXAudioSource); ENUM_CONVERSION_OPS_IMPL (TransceiverFactory, SplitMode); diff --git a/TransceiverFactory.hpp b/TransceiverFactory.hpp index eeb5e529c..7de0273f0 100644 --- a/TransceiverFactory.hpp +++ b/TransceiverFactory.hpp @@ -21,7 +21,7 @@ class TransceiverFactory : public QObject { Q_OBJECT; - Q_ENUMS (DataBits StopBits Handshake PTTMethod TXAudioSource SplitMode); + Q_ENUMS (DataBits StopBits Handshake LineControl PTTMethod TXAudioSource SplitMode); private: Q_DISABLE_COPY (TransceiverFactory); @@ -70,6 +70,7 @@ public: enum DataBits {seven_data_bits = 7, eight_data_bits}; enum StopBits {one_stop_bit = 1, two_stop_bits}; enum Handshake {handshake_none, handshake_XonXoff, handshake_hardware}; + enum LineControl {no_control, force_low, force_high}; enum PTTMethod {PTT_method_VOX, PTT_method_CAT, PTT_method_DTR, PTT_method_RTS}; enum TXAudioSource {TX_audio_source_front, TX_audio_source_rear}; enum SplitMode {split_mode_none, split_mode_rig, split_mode_emulate}; @@ -93,8 +94,8 @@ public: // make a new Transceiver instance // // cat_port, cat_baud, cat_data_bits, cat_stop_bits, cat_handshake, - // cat_dtr_alway_on, cat_rts_always_on are only relevant to - // interfaces that are served by hamlib + // cat_dtr_control, cat_rts_control are only relevant to interfaces + // that are served by Hamlib // // PTT port and to some extent ptt_type are independent of interface // type @@ -105,8 +106,8 @@ public: , DataBits cat_data_bits , StopBits cat_stop_bits , Handshake cat_handshake - , bool cat_dtr_always_on // to power interface - , bool cat_rts_always_on // to power inteface + , LineControl cat_dtr_control // to power interface + , LineControl cat_rts_control // to power inteface , PTTMethod ptt_type // "CAT" | "DTR" | "RTS" | "VOX" , TXAudioSource ptt_use_data_ptt // some rigs allow audio routing to Mic/Data connector , SplitMode split_mode // how to support split TX mode @@ -134,6 +135,7 @@ Q_DECLARE_METATYPE (TransceiverFactory::SplitMode); ENUM_QDEBUG_OPS_DECL (TransceiverFactory, DataBits); ENUM_QDEBUG_OPS_DECL (TransceiverFactory, StopBits); ENUM_QDEBUG_OPS_DECL (TransceiverFactory, Handshake); +ENUM_QDEBUG_OPS_DECL (TransceiverFactory, LineControl); ENUM_QDEBUG_OPS_DECL (TransceiverFactory, PTTMethod); ENUM_QDEBUG_OPS_DECL (TransceiverFactory, TXAudioSource); ENUM_QDEBUG_OPS_DECL (TransceiverFactory, SplitMode); @@ -142,6 +144,7 @@ ENUM_QDEBUG_OPS_DECL (TransceiverFactory, SplitMode); ENUM_QDATASTREAM_OPS_DECL (TransceiverFactory, DataBits); ENUM_QDATASTREAM_OPS_DECL (TransceiverFactory, StopBits); ENUM_QDATASTREAM_OPS_DECL (TransceiverFactory, Handshake); +ENUM_QDATASTREAM_OPS_DECL (TransceiverFactory, LineControl); ENUM_QDATASTREAM_OPS_DECL (TransceiverFactory, PTTMethod); ENUM_QDATASTREAM_OPS_DECL (TransceiverFactory, TXAudioSource); ENUM_QDATASTREAM_OPS_DECL (TransceiverFactory, SplitMode); @@ -149,6 +152,7 @@ ENUM_QDATASTREAM_OPS_DECL (TransceiverFactory, SplitMode); ENUM_CONVERSION_OPS_DECL (TransceiverFactory, DataBits); ENUM_CONVERSION_OPS_DECL (TransceiverFactory, StopBits); ENUM_CONVERSION_OPS_DECL (TransceiverFactory, Handshake); +ENUM_CONVERSION_OPS_DECL (TransceiverFactory, LineControl); ENUM_CONVERSION_OPS_DECL (TransceiverFactory, PTTMethod); ENUM_CONVERSION_OPS_DECL (TransceiverFactory, TXAudioSource); ENUM_CONVERSION_OPS_DECL (TransceiverFactory, SplitMode);