mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-23 20:58:55 -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
74 lines
2.2 KiB
C++
74 lines
2.2 KiB
C++
#ifndef OMNI_RIG_TRANSCEIVER_HPP__
|
|
#define OMNI_RIG_TRANSCEIVER_HPP__
|
|
|
|
#include <memory>
|
|
|
|
#include <QScopedPointer>
|
|
#include <QString>
|
|
|
|
#include "TransceiverFactory.hpp"
|
|
#include "TransceiverBase.hpp"
|
|
|
|
#include "OmniRig.h"
|
|
|
|
//
|
|
// OmniRig Transceiver Interface
|
|
//
|
|
// Implemented as a Transceiver decorator because we may want the PTT
|
|
// services of another Transceiver type such as the HamlibTransceiver
|
|
// which can be enabled by wrapping a HamlibTransceiver instantiated
|
|
// as a "Hamlib Dummy" transceiver in the Transceiver factory method.
|
|
//
|
|
class OmniRigTransceiver final
|
|
: public TransceiverBase
|
|
{
|
|
Q_OBJECT;
|
|
|
|
public:
|
|
static void register_transceivers (TransceiverFactory::Transceivers *, int id1, int id2);
|
|
|
|
enum RigNumber {One = 1, Two};
|
|
|
|
// takes ownership of wrapped Transceiver
|
|
explicit OmniRigTransceiver (std::unique_ptr<TransceiverBase> wrapped, RigNumber, TransceiverFactory::PTTMethod ptt_type, QString const& ptt_port);
|
|
~OmniRigTransceiver ();
|
|
|
|
void do_start () override;
|
|
void do_stop () override;
|
|
void do_frequency (Frequency, MODE = UNK) override;
|
|
void do_tx_frequency (Frequency, bool rationalise_mode) override;
|
|
void do_mode (MODE, bool rationalise) override;
|
|
void do_ptt (bool on) override;
|
|
void do_sync (bool force_signal) override;
|
|
|
|
private:
|
|
Q_SLOT void online_check ();
|
|
Q_SLOT void handle_COM_exception (int, QString, QString, QString);
|
|
Q_SLOT void handle_visible_change ();
|
|
Q_SLOT void handle_rig_type_change (int rig_number);
|
|
Q_SLOT void handle_status_change (int rig_number);
|
|
Q_SLOT void handle_params_change (int rig_number, int params);
|
|
Q_SLOT void handle_custom_reply (int, QVariant const& command, QVariant const& reply);
|
|
|
|
void init_rig ();
|
|
|
|
static MODE map_mode (OmniRig::RigParamX param);
|
|
static OmniRig::RigParamX map_mode (MODE mode);
|
|
|
|
std::unique_ptr<TransceiverBase> wrapped_;
|
|
bool use_for_ptt_;
|
|
TransceiverFactory::PTTMethod ptt_type_;
|
|
unsigned startup_poll_countdown_;
|
|
QScopedPointer<OmniRig::OmniRigX> omni_rig_;
|
|
RigNumber rig_number_;
|
|
QScopedPointer<OmniRig::RigX> rig_;
|
|
QScopedPointer<OmniRig::PortBits> port_;
|
|
int readable_params_;
|
|
int writable_params_;
|
|
bool send_update_signal_;
|
|
bool reversed_; // some rigs can reverse VFOs
|
|
bool starting_;
|
|
};
|
|
|
|
#endif
|