From d63230729bd420b5e438f834a7524a2469daad5a Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Wed, 6 Apr 2016 17:11:41 +0000 Subject: [PATCH] Fix some logic errors in CAT serial port control line settings git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6588 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- Configuration.cpp | 27 +++++++++++++++++---------- Configuration.ui | 35 +++++++++++++++++++---------------- 2 files changed, 36 insertions(+), 26 deletions(-) diff --git a/Configuration.cpp b/Configuration.cpp index f54290cab..ef69f77c8 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -1457,14 +1457,21 @@ void Configuration::impl::set_rig_invariants () ui_->PTT_port_combo_box->setEnabled (enable_ptt_port); ui_->PTT_port_label->setEnabled (enable_ptt_port); - ui_->PTT_port_combo_box->setItemData (ui_->PTT_port_combo_box->findText ("CAT") - , CAT_indirect_serial_PTT ? combo_box_item_enabled : combo_box_item_disabled - , Qt::UserRole - 1); - - ui_->PTT_DTR_radio_button->setEnabled (!("CAT" == ptt_port && !CAT_indirect_serial_PTT)); - - ui_->PTT_RTS_radio_button->setEnabled (!((is_serial_CAT && ptt_port == cat_port && is_hw_handshake) - || ("CAT" == ptt_port && !CAT_indirect_serial_PTT))); + if (CAT_indirect_serial_PTT) + { + ui_->PTT_port_combo_box->setItemData (ui_->PTT_port_combo_box->findText ("CAT") + , combo_box_item_enabled, Qt::UserRole - 1); + } + else + { + ui_->PTT_port_combo_box->setItemData (ui_->PTT_port_combo_box->findText ("CAT") + , combo_box_item_disabled, Qt::UserRole - 1); + if ("CAT" == ui_->PTT_port_combo_box->currentText () && ui_->PTT_port_combo_box->currentIndex () > 0) + { + ui_->PTT_port_combo_box->setCurrentIndex (ui_->PTT_port_combo_box->currentIndex () - 1); + } + } + ui_->PTT_RTS_radio_button->setEnabled (!(is_serial_CAT && ptt_port == cat_port && is_hw_handshake)); if (TransceiverFactory::basic_transceiver_name_ == rig) { @@ -1631,9 +1638,9 @@ TransceiverFactory::ParameterPack Configuration::impl::gather_rig_data () result.stop_bits = static_cast (ui_->CAT_stop_bits_button_group->checkedId ()); result.handshake = static_cast (ui_->CAT_handshake_button_group->checkedId ()); result.force_dtr = ui_->force_DTR_combo_box->isEnabled () && ui_->force_DTR_combo_box->currentIndex () > 0; - result.dtr_high = 1 == ui_->force_DTR_combo_box->currentIndex (); + result.dtr_high = ui_->force_DTR_combo_box->isEnabled () && 1 == ui_->force_DTR_combo_box->currentIndex (); result.force_rts = ui_->force_RTS_combo_box->isEnabled () && ui_->force_RTS_combo_box->currentIndex () > 0; - result.rts_high = 1 == ui_->force_RTS_combo_box->currentIndex (); + result.rts_high = ui_->force_RTS_combo_box->isEnabled () && 1 == ui_->force_RTS_combo_box->currentIndex (); result.poll_interval = ui_->CAT_poll_interval_spin_box->value (); result.ptt_type = static_cast (ui_->PTT_method_button_group->checkedId ()); result.ptt_port = ui_->PTT_port_combo_box->currentText (); diff --git a/Configuration.ui b/Configuration.ui index b3f8c4650..87b927ebf 100644 --- a/Configuration.ui +++ b/Configuration.ui @@ -2,14 +2,6 @@ configuration_dialog - - - 0 - 0 - 545 - 614 - - Settings @@ -807,7 +799,7 @@ a few, particularly some Kenwood rigs, require it). - <html><head/><body><p>Use the RS-232 DTR control line to toggle your radio's PTT,</p><p>requires hardware to inteface the line.</p><p>Some commercial interface units also use this method.</p><p>The DTR control line of the CAT serial port may be used for this or</p><p>a DTR control line on a different serial port may be used.</p></body></html> + <html><head/><body><p>Use the RS-232 DTR control line to toggle your radio's PTT, requires hardware to inteface the line.</p><p>Some commercial interface units also use this method.</p><p>The DTR control line of the CAT serial port may be used for this or a DTR control line on a different serial port may be used.</p></body></html> &DTR @@ -838,7 +830,7 @@ other hardware interface for PTT. - <html><head/><body><p>Use the RS-232 RTS control line to toggle your radio's PTT,</p><p>requires hardware to inteface the line.</p><p>Some commercial interface units also use this method.</p><p>The RTS control line of the CAT serial port may be used for this or</p><p>a RTS control line on a different serial port may be used.</p><p>Note that this options is not available on the CAT serial port</p><p>when hardware flow control is used.</p></body></html> + <html><head/><body><p>Use the RS-232 RTS control line to toggle your radio's PTT, requires hardware to inteface the line.</p><p>Some commercial interface units also use this method.</p><p>The RTS control line of the CAT serial port may be used for this or a RTS control line on a different serial port may be used. Note that this option is not available on the CAT serial port when hardware flow control is used.</p></body></html> R&TS @@ -872,7 +864,7 @@ other hardware interface for PTT. - <html><head/><body><p>Select the RS-232 serial port utilised for PTT control,</p><p>this option is available when DTR or RTS is selected above</p><p>as a transmit method.</p><p>This port can be the same one as the one used for CAT control.</p><p>For some interface types the special value CAT may be chosen,</p><p>this is used for non-serial CAT interfaces that can control</p><p>serial port control lines remotely (OmniRig for example).</p></body></html> + <html><head/><body><p>Select the RS-232 serial port utilised for PTT control, this option is available when DTR or RTS is selected above as a transmit method.</p><p>This port can be the same one as the one used for CAT control.</p><p>For some interface types the special value CAT may be chosen, this is used for non-serial CAT interfaces that can control serial port control lines remotely (OmniRig for example).</p></body></html> true @@ -2403,6 +2395,7 @@ soundcard changes disable_TX_on_73_check_box watchdog_check_box decode_at_52s_check_box + offset_Rx_freq_check_box CW_id_after_73_check_box CW_id_interval_spin_box rig_combo_box @@ -2419,8 +2412,8 @@ soundcard changes force_DTR_combo_box force_RTS_combo_box PTT_VOX_radio_button - PTT_DTR_radio_button PTT_CAT_radio_button + PTT_DTR_radio_button PTT_RTS_radio_button PTT_port_combo_box TX_source_data_radio_button @@ -2463,6 +2456,16 @@ soundcard changes pbTxMsg pbNewDXCC pbNewCall + sbNtrials + cbSync1Bit + cbTwoPass + cbMyDx + cbCQMyN + cbNDxG + cbNN + cbEMEonly + sbAggressive + sbDegrade @@ -2525,19 +2528,19 @@ soundcard changes 60 - 566 + 404 62 - - + + + -