mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-18 10:01:57 -05:00
6a6e56b712
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
72 lines
2.1 KiB
C++
72 lines
2.1 KiB
C++
#ifndef HAMLIB_TRANSCEIVER_HPP_
|
|
#define HAMLIB_TRANSCEIVER_HPP_
|
|
|
|
#include <tuple>
|
|
|
|
#include <QString>
|
|
|
|
#include <hamlib/rig.h>
|
|
|
|
#include "TransceiverFactory.hpp"
|
|
#include "PollingTransceiver.hpp"
|
|
|
|
extern "C"
|
|
{
|
|
typedef struct rig RIG;
|
|
struct rig_caps;
|
|
typedef int vfo_t;
|
|
}
|
|
|
|
// hamlib transceiver and PTT mostly delegated directly to hamlib Rig class
|
|
class HamlibTransceiver final
|
|
: public PollingTransceiver
|
|
{
|
|
Q_OBJECT; // for translation context
|
|
|
|
public:
|
|
static void register_transceivers (TransceiverFactory::Transceivers *);
|
|
|
|
explicit HamlibTransceiver (int model_number
|
|
, QString const& cat_port
|
|
, int cat_baud
|
|
, TransceiverFactory::DataBits cat_data_bits
|
|
, TransceiverFactory::StopBits cat_stop_bits
|
|
, TransceiverFactory::Handshake cat_handshake
|
|
, bool cat_dtr_always_on
|
|
, bool cat_rts_always_on
|
|
, TransceiverFactory::PTTMethod ptt_type
|
|
, TransceiverFactory::TXAudioSource back_ptt_port
|
|
, QString const& ptt_port
|
|
, int poll_interval = 0);
|
|
~HamlibTransceiver ();
|
|
|
|
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_ptt (bool) override;
|
|
|
|
void poll () override;
|
|
|
|
void error_check (int ret_code, QString const& doing) const;
|
|
void set_conf (char const * item, char const * value);
|
|
QByteArray get_conf (char const * item);
|
|
Transceiver::MODE map_mode (rmode_t) const;
|
|
rmode_t map_mode (Transceiver::MODE mode) const;
|
|
std::tuple<vfo_t, vfo_t> get_vfos () const;
|
|
|
|
struct RIGDeleter {static void cleanup (RIG *);};
|
|
QScopedPointer<RIG, RIGDeleter> rig_;
|
|
|
|
bool back_ptt_port_;
|
|
bool is_dummy_;
|
|
|
|
bool mutable reversed_;
|
|
|
|
bool split_query_works_;
|
|
};
|
|
|
|
#endif
|