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:
Joe Taylor 2013-07-18 11:55:29 +00:00
parent 8f3c9a672b
commit 982210157f
2 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
//-------------------------------------------------------------- MainWindow
//--------------------------------------------------------------- MainWindow
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "devsetup.h"

View File

@ -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);