diff --git a/DXLabSuiteCommanderTransceiver.hpp b/DXLabSuiteCommanderTransceiver.hpp index e23c32a58..c039857bc 100644 --- a/DXLabSuiteCommanderTransceiver.hpp +++ b/DXLabSuiteCommanderTransceiver.hpp @@ -33,7 +33,7 @@ public: protected: void do_start () override; void do_stop () override; - void do_frequency (Frequency, MODE = UNK) override; + void do_frequency (Frequency, MODE) override; void do_tx_frequency (Frequency, bool rationalise_mode) override; void do_mode (MODE, bool rationalise) override; void do_ptt (bool on) override; diff --git a/HRDTransceiver.cpp b/HRDTransceiver.cpp index 5b3d937bf..b0c3c1c09 100644 --- a/HRDTransceiver.cpp +++ b/HRDTransceiver.cpp @@ -13,6 +13,10 @@ namespace { char const * const HRD_transceiver_name = "Ham Radio Deluxe"; + + // some commands require a settling time, particularly "RX A" and + // "RX B" on the Yaesu FTdx3000. + int constexpr yaesu_delay {250}; } void HRDTransceiver::register_transceivers (TransceiverFactory::Transceivers * registry, int id) @@ -445,6 +449,10 @@ void HRDTransceiver::set_button (int button_index, bool checked) if (button_index >= 0) { send_simple_command ("set button-select " + buttons_.value (button_index) + (checked ? " 1" : " 0")); + if (button_index == rx_A_button_ || button_index == rx_B_button_) + { + QThread::msleep (yaesu_delay); + } } else { @@ -840,7 +848,7 @@ QString HRDTransceiver::send_command (QString const& cmd, bool no_debug, bool pr // required on some radios because commands don't get executed // correctly otherwise (ICOM for example) QThread::msleep (50); - } + } if (!recurse && prepend_context) { diff --git a/HRDTransceiver.hpp b/HRDTransceiver.hpp index 43341874a..87a9a439b 100644 --- a/HRDTransceiver.hpp +++ b/HRDTransceiver.hpp @@ -41,9 +41,9 @@ protected: // Implement the TransceiverBase interface. void do_start () override; void do_stop () override; - void do_frequency (Frequency, MODE = UNK) override; - void do_tx_frequency (Frequency, bool rationalise_mode = true) override; - void do_mode (MODE, bool rationalise = true) override; + void do_frequency (Frequency, MODE) override; + void do_tx_frequency (Frequency, bool rationalise_mode) override; + void do_mode (MODE, bool rationalise) override; void do_ptt (bool on) override; // Implement the PollingTransceiver interface. diff --git a/HamlibTransceiver.hpp b/HamlibTransceiver.hpp index 8e7f8d8fe..567ac3dbe 100644 --- a/HamlibTransceiver.hpp +++ b/HamlibTransceiver.hpp @@ -33,9 +33,9 @@ class HamlibTransceiver final private: void do_start () override; void do_stop () override; - void do_frequency (Frequency, MODE = UNK) override; - void do_tx_frequency (Frequency, bool rationalise_mode = true) override; - void do_mode (MODE, bool rationalise = true) override; + void do_frequency (Frequency, MODE) override; + void do_tx_frequency (Frequency, bool rationalise_mode) override; + void do_mode (MODE, bool rationalise) override; void do_ptt (bool) override; void poll () override; diff --git a/OmniRigTransceiver.hpp b/OmniRigTransceiver.hpp index 729543c8a..f2b4e3528 100644 --- a/OmniRigTransceiver.hpp +++ b/OmniRigTransceiver.hpp @@ -35,7 +35,7 @@ public: void do_start () override; void do_stop () override; - void do_frequency (Frequency, MODE = UNK) override; + void do_frequency (Frequency, MODE) override; void do_tx_frequency (Frequency, bool rationalise_mode) override; void do_mode (MODE, bool rationalise) override; void do_ptt (bool on) override; diff --git a/TransceiverBase.hpp b/TransceiverBase.hpp index 8430ad498..673736380 100644 --- a/TransceiverBase.hpp +++ b/TransceiverBase.hpp @@ -98,8 +98,8 @@ protected: virtual void do_frequency (Frequency rx, MODE = UNK) = 0; virtual void do_post_frequency (Frequency, MODE = UNK) {} - virtual void do_tx_frequency (Frequency tx = 0, bool rationalise_mode = true) = 0; - virtual void do_post_tx_frequency (Frequency, bool /* rationalise_mode */ = true) {} + virtual void do_tx_frequency (Frequency tx = 0u, bool rationalise_mode = false) = 0; + virtual void do_post_tx_frequency (Frequency = 0u, bool /* rationalise_mode */ = false) {} virtual void do_mode (MODE, bool rationalise = true) = 0; virtual void do_post_mode (MODE, bool /* rationalise */ = true) {}