mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-08 08:54:41 -04:00
Various defect repairs and ambigous behaviour clarifications
A regression introduced in v1.5.0-rc1 where PTT on an alternate serial port when using no CAT control is resolved. A regression introduced in v1.5.0-rc1 where the network server field was not being restored in the settings dialog has been resolved. In settings the "Test PTT" button is now styled by checked state. The "Test PTT" button is enabled without needing click "Test CAT" first when no CAT rig control is selected. Various parts of the settings dialog are now disabled when no CAT rig control is selected. These are the "Mode" group, the "Split Operation" group and the "Monitor returns to last used frequency" check box. None of these have any visible impact nor make sense without CAT rig control. Initialization and teardown of rig control internals has been revised to avoid several problems related to timing and when switching between different CAT settings. This includes improvements in having the operating frequency restored between sessions when not using CAT rig control. The initialization of OmniRig connections has been improved, unfortunately it is still possible to get an exception when clicking the "Test CAT" button where just clicking "OK" and leaving the settings dialog will probably work. Some unnecessary CAT commands output during direct rig control have been elided to reduce the level of traffic a little. The handling of some automatically generated free text messages used when the station is a type 2 compound callsign or is working a type 2 compound callsign has been improved. This is related to how a double click on a message of the form "DE TI4/N0URE 73" is double clicked. The new behaviour depends on whether the current "DX Call" matches the call in the message. This resolves the ambiguity as to whether this message is a sign off at the end of a QSO with current operator (a 73 message is generated) or a tail end opportunity where the message should be treated the same as a CQ or QRZ message (WSJT-X QSYs to the frequency, generates messages and selects message one ready to call). This still leaves some potential ambiguous behaviors in this complex area but selecting "Clear DX call and grid after logging" should resolve most of them. Rig control trace messages have been cleaned up and are now more helpful, less verbose and, tidier in the source code. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx-1.5@5297 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
+12
-98
@@ -94,50 +94,22 @@ bool TransceiverFactory::has_asynchronous_CAT (QString const& name) const
|
||||
return supported_transceivers ()[name].asynchronous_;
|
||||
}
|
||||
|
||||
std::unique_ptr<Transceiver> TransceiverFactory::create (QString const& name
|
||||
, QString const& cat_port
|
||||
, int cat_baud
|
||||
, DataBits cat_data_bits
|
||||
, StopBits cat_stop_bits
|
||||
, Handshake cat_handshake
|
||||
, LineControl cat_dtr_control
|
||||
, LineControl cat_rts_control
|
||||
, PTTMethod ptt_type
|
||||
, TXAudioSource ptt_use_data_ptt
|
||||
, SplitMode split_mode
|
||||
, QString const& ptt_port
|
||||
, int poll_interval
|
||||
, QThread * target_thread
|
||||
)
|
||||
std::unique_ptr<Transceiver> TransceiverFactory::create (ParameterPack const& params, QThread * target_thread)
|
||||
{
|
||||
std::unique_ptr<Transceiver> result;
|
||||
switch (supported_transceivers ()[name].model_number_)
|
||||
switch (supported_transceivers ()[params.rig_name].model_number_)
|
||||
{
|
||||
case CommanderId:
|
||||
{
|
||||
// we start with a dummy HamlibTransceiver object instance that can support direct PTT
|
||||
std::unique_ptr<TransceiverBase> basic_transceiver {
|
||||
new HamlibTransceiver {
|
||||
supported_transceivers ()[basic_transceiver_name_].model_number_
|
||||
, cat_port
|
||||
, cat_baud
|
||||
, cat_data_bits
|
||||
, cat_stop_bits
|
||||
, cat_handshake
|
||||
, force_low
|
||||
, force_low
|
||||
, ptt_type
|
||||
, ptt_use_data_ptt
|
||||
, "CAT" == ptt_port ? "" : ptt_port
|
||||
}
|
||||
};
|
||||
std::unique_ptr<TransceiverBase> basic_transceiver {new HamlibTransceiver {params.ptt_type, params.ptt_port}};
|
||||
if (target_thread)
|
||||
{
|
||||
basic_transceiver.get ()->moveToThread (target_thread);
|
||||
}
|
||||
|
||||
// wrap the basic Transceiver object instance with a decorator object that talks to DX Lab Suite Commander
|
||||
result.reset (new DXLabSuiteCommanderTransceiver {std::move (basic_transceiver), cat_port, PTT_method_CAT == ptt_type, poll_interval});
|
||||
result.reset (new DXLabSuiteCommanderTransceiver {std::move (basic_transceiver), params.network_port, PTT_method_CAT == params.ptt_type, params.poll_interval});
|
||||
if (target_thread)
|
||||
{
|
||||
result.get ()->moveToThread (target_thread);
|
||||
@@ -148,28 +120,14 @@ std::unique_ptr<Transceiver> TransceiverFactory::create (QString const& name
|
||||
case HRDId:
|
||||
{
|
||||
// we start with a dummy HamlibTransceiver object instance that can support direct PTT
|
||||
std::unique_ptr<TransceiverBase> basic_transceiver {
|
||||
new HamlibTransceiver {
|
||||
supported_transceivers ()[basic_transceiver_name_].model_number_
|
||||
, cat_port
|
||||
, cat_baud
|
||||
, cat_data_bits
|
||||
, cat_stop_bits
|
||||
, cat_handshake
|
||||
, cat_dtr_control
|
||||
, cat_rts_control
|
||||
, ptt_type
|
||||
, ptt_use_data_ptt
|
||||
, "CAT" == ptt_port ? "" : ptt_port
|
||||
}
|
||||
};
|
||||
std::unique_ptr<TransceiverBase> basic_transceiver {new HamlibTransceiver {params.ptt_type, params.ptt_port}};
|
||||
if (target_thread)
|
||||
{
|
||||
basic_transceiver.get ()->moveToThread (target_thread);
|
||||
}
|
||||
|
||||
// wrap the basic Transceiver object instance with a decorator object that talks to ham Radio Deluxe
|
||||
result.reset (new HRDTransceiver {std::move (basic_transceiver), cat_port, PTT_method_CAT == ptt_type, poll_interval});
|
||||
result.reset (new HRDTransceiver {std::move (basic_transceiver), params.network_port, PTT_method_CAT == params.ptt_type, params.poll_interval});
|
||||
if (target_thread)
|
||||
{
|
||||
result.get ()->moveToThread (target_thread);
|
||||
@@ -181,28 +139,14 @@ std::unique_ptr<Transceiver> TransceiverFactory::create (QString const& name
|
||||
case OmniRigOneId:
|
||||
{
|
||||
// we start with a dummy HamlibTransceiver object instance that can support direct PTT
|
||||
std::unique_ptr<TransceiverBase> basic_transceiver {
|
||||
new HamlibTransceiver {
|
||||
supported_transceivers ()[basic_transceiver_name_].model_number_
|
||||
, cat_port
|
||||
, cat_baud
|
||||
, cat_data_bits
|
||||
, cat_stop_bits
|
||||
, cat_handshake
|
||||
, cat_dtr_control
|
||||
, cat_rts_control
|
||||
, ptt_type
|
||||
, ptt_use_data_ptt
|
||||
, "CAT" == ptt_port ? "" : ptt_port
|
||||
}
|
||||
};
|
||||
std::unique_ptr<TransceiverBase> basic_transceiver {new HamlibTransceiver {params.ptt_type, params.ptt_port}};
|
||||
if (target_thread)
|
||||
{
|
||||
basic_transceiver.get ()->moveToThread (target_thread);
|
||||
}
|
||||
|
||||
// wrap the basic Transceiver object instance with a decorator object that talks to OmniRig rig one
|
||||
result.reset (new OmniRigTransceiver {std::move (basic_transceiver), OmniRigTransceiver::One, ptt_type, ptt_port});
|
||||
result.reset (new OmniRigTransceiver {std::move (basic_transceiver), OmniRigTransceiver::One, params.ptt_type, params.ptt_port});
|
||||
if (target_thread)
|
||||
{
|
||||
result.get ()->moveToThread (target_thread);
|
||||
@@ -213,28 +157,14 @@ std::unique_ptr<Transceiver> TransceiverFactory::create (QString const& name
|
||||
case OmniRigTwoId:
|
||||
{
|
||||
// we start with a dummy HamlibTransceiver object instance that can support direct PTT
|
||||
std::unique_ptr<TransceiverBase> basic_transceiver {
|
||||
new HamlibTransceiver {
|
||||
supported_transceivers ()[basic_transceiver_name_].model_number_
|
||||
, cat_port
|
||||
, cat_baud
|
||||
, cat_data_bits
|
||||
, cat_stop_bits
|
||||
, cat_handshake
|
||||
, cat_dtr_control
|
||||
, cat_rts_control
|
||||
, ptt_type
|
||||
, ptt_use_data_ptt
|
||||
, "CAT" == ptt_port ? "" : ptt_port
|
||||
}
|
||||
};
|
||||
std::unique_ptr<TransceiverBase> basic_transceiver {new HamlibTransceiver {params.ptt_type, params.ptt_port}};
|
||||
if (target_thread)
|
||||
{
|
||||
basic_transceiver.get ()->moveToThread (target_thread);
|
||||
}
|
||||
|
||||
// wrap the basic Transceiver object instance with a decorator object that talks to OmniRig rig two
|
||||
result.reset (new OmniRigTransceiver {std::move (basic_transceiver), OmniRigTransceiver::Two, ptt_type, ptt_port});
|
||||
result.reset (new OmniRigTransceiver {std::move (basic_transceiver), OmniRigTransceiver::Two, params.ptt_type, params.ptt_port});
|
||||
if (target_thread)
|
||||
{
|
||||
result.get ()->moveToThread (target_thread);
|
||||
@@ -244,20 +174,7 @@ std::unique_ptr<Transceiver> TransceiverFactory::create (QString const& name
|
||||
#endif
|
||||
|
||||
default:
|
||||
result.reset (new HamlibTransceiver {
|
||||
supported_transceivers ()[name].model_number_
|
||||
, cat_port
|
||||
, cat_baud
|
||||
, cat_data_bits
|
||||
, cat_stop_bits
|
||||
, cat_handshake
|
||||
, cat_dtr_control
|
||||
, cat_rts_control
|
||||
, ptt_type
|
||||
, ptt_use_data_ptt
|
||||
, "CAT" == ptt_port ? cat_port : ptt_port
|
||||
, poll_interval
|
||||
});
|
||||
result.reset (new HamlibTransceiver {supported_transceivers ()[params.rig_name].model_number_, params});
|
||||
if (target_thread)
|
||||
{
|
||||
result.get ()->moveToThread (target_thread);
|
||||
@@ -265,7 +182,7 @@ std::unique_ptr<Transceiver> TransceiverFactory::create (QString const& name
|
||||
break;
|
||||
}
|
||||
|
||||
if (split_mode_emulate == split_mode)
|
||||
if (split_mode_emulate == params.split_mode)
|
||||
{
|
||||
// wrap the Transceiver object instance with a decorator that emulates split mode
|
||||
result.reset (new EmulateSplitTransceiver {std::move (result)});
|
||||
@@ -282,7 +199,6 @@ std::unique_ptr<Transceiver> 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);
|
||||
@@ -291,7 +207,6 @@ 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);
|
||||
@@ -299,7 +214,6 @@ 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);
|
||||
|
||||
Reference in New Issue
Block a user