mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-14 11:49:30 -04:00
Add default options for Hamlib CAT serial data bits, stop bits, and handshaking
Hamlib has deafult values for these options that are nearly always correct so we can offer a default option in WSJT-X which in turn is the defaulty option. Thanks to Mike, W9MDB, for the builk of this contribution. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8568 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
+6
-3
@@ -955,12 +955,15 @@ Configuration::impl::impl (Configuration * self, QDir const& temp_directory,
|
||||
//
|
||||
// assign ids to radio buttons
|
||||
//
|
||||
ui_->CAT_data_bits_button_group->setId (ui_->CAT_default_bit_radio_button, TransceiverFactory::default_data_bits);
|
||||
ui_->CAT_data_bits_button_group->setId (ui_->CAT_7_bit_radio_button, TransceiverFactory::seven_data_bits);
|
||||
ui_->CAT_data_bits_button_group->setId (ui_->CAT_8_bit_radio_button, TransceiverFactory::eight_data_bits);
|
||||
|
||||
ui_->CAT_stop_bits_button_group->setId (ui_->CAT_default_stop_bit_radio_button, TransceiverFactory::default_stop_bits);
|
||||
ui_->CAT_stop_bits_button_group->setId (ui_->CAT_one_stop_bit_radio_button, TransceiverFactory::one_stop_bit);
|
||||
ui_->CAT_stop_bits_button_group->setId (ui_->CAT_two_stop_bit_radio_button, TransceiverFactory::two_stop_bits);
|
||||
|
||||
ui_->CAT_handshake_button_group->setId (ui_->CAT_handshake_default_radio_button, TransceiverFactory::handshake_default);
|
||||
ui_->CAT_handshake_button_group->setId (ui_->CAT_handshake_none_radio_button, TransceiverFactory::handshake_none);
|
||||
ui_->CAT_handshake_button_group->setId (ui_->CAT_handshake_xon_radio_button, TransceiverFactory::handshake_XonXoff);
|
||||
ui_->CAT_handshake_button_group->setId (ui_->CAT_handshake_hardware_radio_button, TransceiverFactory::handshake_hardware);
|
||||
@@ -1367,9 +1370,9 @@ void Configuration::impl::read_settings ()
|
||||
rig_params_.usb_port = settings_->value ("CATUSBPort").toString ();
|
||||
rig_params_.serial_port = settings_->value ("CATSerialPort").toString ();
|
||||
rig_params_.baud = settings_->value ("CATSerialRate", 4800).toInt ();
|
||||
rig_params_.data_bits = settings_->value ("CATDataBits", QVariant::fromValue (TransceiverFactory::eight_data_bits)).value<TransceiverFactory::DataBits> ();
|
||||
rig_params_.stop_bits = settings_->value ("CATStopBits", QVariant::fromValue (TransceiverFactory::two_stop_bits)).value<TransceiverFactory::StopBits> ();
|
||||
rig_params_.handshake = settings_->value ("CATHandshake", QVariant::fromValue (TransceiverFactory::handshake_none)).value<TransceiverFactory::Handshake> ();
|
||||
rig_params_.data_bits = settings_->value ("CATDataBits", QVariant::fromValue (TransceiverFactory::default_data_bits)).value<TransceiverFactory::DataBits> ();
|
||||
rig_params_.stop_bits = settings_->value ("CATStopBits", QVariant::fromValue (TransceiverFactory::default_stop_bits)).value<TransceiverFactory::StopBits> ();
|
||||
rig_params_.handshake = settings_->value ("CATHandshake", QVariant::fromValue (TransceiverFactory::handshake_default)).value<TransceiverFactory::Handshake> ();
|
||||
rig_params_.force_dtr = settings_->value ("CATForceDTR", false).toBool ();
|
||||
rig_params_.dtr_high = settings_->value ("DTR", false).toBool ();
|
||||
rig_params_.force_rts = settings_->value ("CATForceRTS", false).toBool ();
|
||||
|
||||
Reference in New Issue
Block a user