mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-26 14:18:38 -05:00
Fix frequency-setting through Commander so that it works to nearest Hz.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3493 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
8f3c9a672b
commit
982210157f
@ -1,4 +1,4 @@
|
||||
//-------------------------------------------------------------- MainWindow
|
||||
//--------------------------------------------------------------- MainWindow
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
#include "devsetup.h"
|
||||
|
@ -164,8 +164,8 @@ int Rig::setFreq(freq_t freq, vfo_t vfo) {
|
||||
}
|
||||
} else if(m_cmndr) {
|
||||
QString t;
|
||||
qint32 nkHz=int(0.001*freq);
|
||||
t.sprintf("<command:10>CmdSetFreq<parameters:18><xcvrfreq:6>%6d",nkHz);
|
||||
double f=0.001*freq;
|
||||
t.sprintf("<command:10>CmdSetFreq<parameters:23><xcvrfreq:10>%10.3f",f);
|
||||
QByteArray ba = t.toLocal8Bit();
|
||||
const char* buf=ba.data();
|
||||
socket->write(buf);
|
||||
@ -212,8 +212,8 @@ int Rig::setSplitFreq(freq_t tx_freq, vfo_t vfo) {
|
||||
}
|
||||
} else if(m_cmndr) {
|
||||
QString t;
|
||||
qint32 nkHz=int(0.001*tx_freq);
|
||||
t.sprintf("<command:12>CmdSetTxFreq<parameters:18><xcvrfreq:6>%6d",nkHz);
|
||||
double f=0.001*tx_freq;
|
||||
t.sprintf("<command:12>CmdSetTxFreq<parameters:23><xcvrfreq:10>%10.3f",f);
|
||||
QByteArray ba = t.toLocal8Bit();
|
||||
const char* buf=ba.data();
|
||||
socket->write(buf);
|
||||
|
Loading…
Reference in New Issue
Block a user