mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-23 12:48:40 -05:00
4300b45e6a
Also cleaned up duplicate trace output. Using the DX Lab Suite Commander CAT interface with rigs like the TS-2000 requires that split mode be set after changing the Tx frequency. This is because setting teh Tx frequency disables split mode. With some Icom rigs the rig must be in split mode before setting the Tx frequency otherwise the Tx frequency change will not be honoured. To fix this the sequence set-split, set-tx-frequency, set-split must always be used to change the Tx frequency. Support for new DX Lab Suite Commander TCP/IP commands Dave AA6YQ has added two new commands to the Commander server to allow more reliable control. Requires DX Lab Suite Commander 11.1.4 or later. Ensure split Tx frequency agrees with UI before transmitting Ensure split works on Yaesu via Hamlib without breaking others Also improved class HamlibTransceiver debug trace messages. Merged r4776-r4779 from wsjtx-1.4 branch. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4780 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
54 lines
1.7 KiB
C++
54 lines
1.7 KiB
C++
#ifndef EMULATE_SPLIT_TRANSCEIVER_HPP__
|
|
#define EMULATE_SPLIT_TRANSCEIVER_HPP__
|
|
|
|
#include <memory>
|
|
|
|
#include "Transceiver.hpp"
|
|
|
|
//
|
|
// Emulate Split Transceiver
|
|
//
|
|
// Helper decorator class that encapsulates the emulation of split TX
|
|
// operation.
|
|
//
|
|
// Responsibilities
|
|
//
|
|
// Delegates all but setting of other (split) frequency to the
|
|
// wrapped Transceiver instance. Also routes failure signals from the
|
|
// wrapped Transceiver instance to this instances failure signal.
|
|
//
|
|
// Intercepts status updates from the wrapped Transceiver instance
|
|
// and re-signals it with the emulated status.
|
|
//
|
|
// Generates a status update signal if the other (split) frequency is
|
|
// changed, this is necessary since the wrapped transceiver instance
|
|
// never receives other frequency changes.
|
|
//
|
|
class EmulateSplitTransceiver final
|
|
: public Transceiver
|
|
{
|
|
public:
|
|
// takes ownership of wrapped Transceiver
|
|
explicit EmulateSplitTransceiver (std::unique_ptr<Transceiver> wrapped);
|
|
|
|
void start () noexcept override;
|
|
void frequency (Frequency, MODE) noexcept override;
|
|
void tx_frequency (Frequency, bool rationalise_mode) noexcept override;
|
|
void ptt (bool on) noexcept override;
|
|
|
|
// forward everything else to wrapped Transceiver
|
|
void stop () noexcept override {wrapped_->stop (); Q_EMIT finished ();}
|
|
void mode (MODE m, bool /* rationalise */) noexcept override {wrapped_->mode (m, false);}
|
|
void sync (bool force_signal) noexcept override {wrapped_->sync (force_signal);}
|
|
|
|
private:
|
|
void handle_update (TransceiverState);
|
|
|
|
std::unique_ptr<Transceiver> wrapped_;
|
|
Frequency frequency_[2]; // [0] <- RX, [1] <- other
|
|
Frequency pre_tx_frequency_; // return to this on switching to Rx
|
|
bool tx_;
|
|
};
|
|
|
|
#endif
|