Minor cleanup of HRD-related code.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3290 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2013-05-21 21:31:11 +00:00
parent f833e00699
commit d27b171368
2 changed files with 3 additions and 1 deletions

View File

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

View File

@ -85,6 +85,7 @@ int Rig::open(int n) {
if(bConnect) {
const wchar_t* context=HRDInterfaceSendMessage(L"Get Context");
m_context="[" + QString::fromWCharArray (context,-1) + "] ";
HRDInterfaceFreeString(context);
return 0;
} else {
m_hrd=false;
@ -117,6 +118,7 @@ int Rig::setFreq(freq_t freq, vfo_t vfo) {
const wchar_t* cmnd = (const wchar_t*) t.utf16();
const wchar_t* result=HRDInterfaceSendMessage(cmnd);
QString t2=QString::fromWCharArray (result,-1);
HRDInterfaceFreeString(result);
if(t2=="OK") {
return 0;
} else {