mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-09 01:14:51 -04:00
Add facility to disallow CAT commands while transmitting.
Some rigs either do not honour some CAT commands while transmitting or interpret them incorrectly. To deal with this a settings option to allow TX frequency changes while transmitting has been added with a default value of off. Any UI actions that directly or indirectly change the TX frequency are guarded according to this new option. As well as this band changes and use of the +2kHz check box are disabled and guarded respectively in transmit mode. Mode changes via the menu are now disabled while transmitting. When TX frequency changes are allowed; frequency changes are correctly implemented while in tune mode. Double clicking decodes while transmitting now correctly regenerate and change the message sent on the fly. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4349 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
+10
-16
@@ -399,18 +399,9 @@ int CPlotter::binsPerPixel() // get nbpp
|
||||
return m_binsPerPixel;
|
||||
}
|
||||
|
||||
void CPlotter::setRxFreq(int x, bool bf) //setRxFreq()
|
||||
void CPlotter::setRxFreq (int x)
|
||||
{
|
||||
if(bf) {
|
||||
m_rxFreq=x; // x is freq in Hz
|
||||
m_xClick=XfromFreq(m_rxFreq);
|
||||
} else {
|
||||
if(x<0) x=0; // x is pixel number
|
||||
if(x>m_Size.width()) x=m_Size.width();
|
||||
m_rxFreq=int(FreqfromX(x)+0.5);
|
||||
m_xClick=x;
|
||||
}
|
||||
emit setFreq1(m_rxFreq,m_txFreq);
|
||||
m_rxFreq = x; // x is freq in Hz
|
||||
DrawOverlay();
|
||||
update();
|
||||
}
|
||||
@@ -420,18 +411,22 @@ int CPlotter::rxFreq() {return m_rxFreq;} //get rxFreq
|
||||
void CPlotter::mousePressEvent(QMouseEvent *event) //mousePressEvent
|
||||
{
|
||||
int x=event->x();
|
||||
setRxFreq(x,false); // Wideband waterfall
|
||||
if(x<0) x=0;
|
||||
if(x>m_Size.width()) x=m_Size.width();
|
||||
bool ctrl = (event->modifiers() & Qt::ControlModifier);
|
||||
int freq = int(FreqfromX(x)+0.5);
|
||||
int tx_freq = m_txFreq;
|
||||
if (ctrl or m_lockTxFreq) tx_freq = freq;
|
||||
|
||||
emit setFreq1 (freq, tx_freq);
|
||||
|
||||
int n=1;
|
||||
if(ctrl) n+=100;
|
||||
emit freezeDecode1(n);
|
||||
if(ctrl or m_lockTxFreq) setTxFreq(m_rxFreq);
|
||||
}
|
||||
|
||||
void CPlotter::mouseDoubleClickEvent(QMouseEvent *event) //mouse2click
|
||||
{
|
||||
// int x=event->x();
|
||||
// setRxFreq(x,false);
|
||||
bool ctrl = (event->modifiers() & Qt::ControlModifier);
|
||||
int n=2;
|
||||
if(ctrl) n+=100;
|
||||
@@ -464,7 +459,6 @@ void CPlotter::setNsps(int ntrperiod, int nsps)
|
||||
void CPlotter::setTxFreq(int n) //setTol()
|
||||
{
|
||||
m_txFreq=n;
|
||||
emit setFreq1(m_rxFreq,m_txFreq);
|
||||
DrawOverlay();
|
||||
update();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user