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
63 lines
1.8 KiB
C++
63 lines
1.8 KiB
C++
#ifndef POLLING_TRANSCEIVER_HPP__
|
|
#define POLLING_TRANSCEIVER_HPP__
|
|
|
|
#include <QObject>
|
|
|
|
#include "TransceiverBase.hpp"
|
|
|
|
#include "pimpl_h.hpp"
|
|
|
|
//
|
|
// Polling Transceiver
|
|
//
|
|
// Helper base class that encapsulates the emulation of continuous
|
|
// update and caching of a transceiver state.
|
|
//
|
|
// Collaborations
|
|
//
|
|
// Implements the TransceiverBase post action interface and provides
|
|
// the abstract poll() operation for sub-classes to implement. The
|
|
// pol operation is invoked every poll_interval milliseconds.
|
|
//
|
|
// Responsibilities
|
|
//
|
|
// Because some rig interfaces don't immediately update after a state
|
|
// change request; this class allows a rig a few polls to stabilise
|
|
// to the requested state before signalling the change. This means
|
|
// that clients don't see intermediate states that are sometimes
|
|
// inaccurate, e.g. changing the split TX frequency on Icom rigs
|
|
// requires a VFO switch and polls while switched will return the
|
|
// wrong current frequency.
|
|
//
|
|
class PollingTransceiver
|
|
: public TransceiverBase
|
|
{
|
|
Q_OBJECT; // for translation context
|
|
|
|
protected:
|
|
explicit PollingTransceiver (int poll_interval); // in milliseconds
|
|
|
|
public:
|
|
~PollingTransceiver ();
|
|
|
|
protected:
|
|
void do_sync (bool force_signal) override final;
|
|
|
|
// Sub-classes implement this and fetch what they can from the rig
|
|
// in a non-intrusive manner.
|
|
virtual void poll () = 0;
|
|
|
|
void do_post_start () override final;
|
|
void do_post_stop () override final;
|
|
void do_post_frequency (Frequency, MODE = UNK) override final;
|
|
void do_post_tx_frequency (Frequency, bool rationalize = true) override final;
|
|
void do_post_mode (MODE, bool rationalize = true) override final;
|
|
bool do_pre_update () override final;
|
|
|
|
private:
|
|
class impl;
|
|
pimpl<impl> m_;
|
|
};
|
|
|
|
#endif
|