mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-11-04 05:50:31 -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 "mainwindow.h"
 | 
				
			||||||
#include "ui_mainwindow.h"
 | 
					#include "ui_mainwindow.h"
 | 
				
			||||||
#include "devsetup.h"
 | 
					#include "devsetup.h"
 | 
				
			||||||
 | 
				
			|||||||
@ -164,8 +164,8 @@ int Rig::setFreq(freq_t freq, vfo_t vfo) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  } else if(m_cmndr) {
 | 
					  } else if(m_cmndr) {
 | 
				
			||||||
    QString t;
 | 
					    QString t;
 | 
				
			||||||
    qint32 nkHz=int(0.001*freq);
 | 
					    double f=0.001*freq;
 | 
				
			||||||
    t.sprintf("<command:10>CmdSetFreq<parameters:18><xcvrfreq:6>%6d",nkHz);
 | 
					    t.sprintf("<command:10>CmdSetFreq<parameters:23><xcvrfreq:10>%10.3f",f);
 | 
				
			||||||
    QByteArray ba = t.toLocal8Bit();
 | 
					    QByteArray ba = t.toLocal8Bit();
 | 
				
			||||||
    const char* buf=ba.data();
 | 
					    const char* buf=ba.data();
 | 
				
			||||||
    socket->write(buf);
 | 
					    socket->write(buf);
 | 
				
			||||||
@ -212,8 +212,8 @@ int Rig::setSplitFreq(freq_t tx_freq, vfo_t vfo) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  } else if(m_cmndr) {
 | 
					  } else if(m_cmndr) {
 | 
				
			||||||
    QString t;
 | 
					    QString t;
 | 
				
			||||||
    qint32 nkHz=int(0.001*tx_freq);
 | 
					    double f=0.001*tx_freq;
 | 
				
			||||||
    t.sprintf("<command:12>CmdSetTxFreq<parameters:18><xcvrfreq:6>%6d",nkHz);
 | 
					    t.sprintf("<command:12>CmdSetTxFreq<parameters:23><xcvrfreq:10>%10.3f",f);
 | 
				
			||||||
    QByteArray ba = t.toLocal8Bit();
 | 
					    QByteArray ba = t.toLocal8Bit();
 | 
				
			||||||
    const char* buf=ba.data();
 | 
					    const char* buf=ba.data();
 | 
				
			||||||
    socket->write(buf);
 | 
					    socket->write(buf);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user