mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-15 16:42:12 -05:00
424ed88645
V12.2.6 of teh DX Lab Suite Commander finally has a way to suppress mode rationalization when setting the split Tx frequency. This now means that we can now honor the radio setting to not change the rig modulation mode. This should help with a number of rigs that require different modes on teh Tx and Rx VFOs for optimal wide band digital operation. This will also help with some rig and interface combinations that lock up or otherwise misbehave when setting the Tx VFO mode at certain times with respect to other rig control commands. This change also improves mode setting in general hopefully closing a few corner case issues when starting up and when transmitting for the first time in a session. Included is the latest DX Lab Suite Commander TCP/IP commands documentation correct for v12.2.6. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7030 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
75 lines
2.1 KiB
C++
75 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 *);
|
|
static void unregister_transceivers ();
|
|
|
|
explicit HamlibTransceiver (int model_number, TransceiverFactory::ParameterPack const&,
|
|
QObject * parent = nullptr);
|
|
explicit HamlibTransceiver (TransceiverFactory::PTTMethod ptt_type, QString const& ptt_port,
|
|
QObject * parent = nullptr);
|
|
|
|
private:
|
|
int do_start () override;
|
|
void do_stop () override;
|
|
void do_frequency (Frequency, MODE, bool no_ignore) override;
|
|
void do_tx_frequency (Frequency, MODE, bool no_ignore) override;
|
|
void do_mode (MODE) 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 (bool for_split) const;
|
|
|
|
struct RIGDeleter {static void cleanup (RIG *);};
|
|
QScopedPointer<RIG, RIGDeleter> rig_;
|
|
|
|
bool back_ptt_port_;
|
|
bool one_VFO_;
|
|
bool is_dummy_;
|
|
|
|
// these are saved on destruction so we can start new instances
|
|
// where the last one left off
|
|
static freq_t dummy_frequency_;
|
|
static rmode_t dummy_mode_;
|
|
|
|
bool mutable reversed_;
|
|
|
|
bool mode_query_works_;
|
|
bool split_query_works_;
|
|
bool tickle_hamlib_; // Hamlib requires a
|
|
// rig_set_split_vfo() call to
|
|
// establish the Tx VFO
|
|
bool get_vfo_works_; // Net rigctl promises what it can't deliver
|
|
};
|
|
|
|
#endif
|