OK, PTT switching via HRD now works, at least for the TS-2000.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3312 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2013-05-23 22:00:12 +00:00
parent 612504ef27
commit 64c6b94776
3 changed files with 13 additions and 8 deletions

View File

@ -527,6 +527,6 @@ void DevSetup::enableWidgets()
bool b2 = (m_catEnabled and m_pttMethodIndex==1 and m_rig!=9999) or
(m_catEnabled and m_pttMethodIndex==2 and m_rig!=9999);
bool b3 = (m_catEnabled and m_pttMethodIndex==0 and m_rig==9999);
ui.testPTTButton->setEnabled(b1 or b2);
// ui.testPTTButton->setEnabled(b1 or b2 or b3);
// ui.testPTTButton->setEnabled(b1 or b2);
ui.testPTTButton->setEnabled(b1 or b2 or b3); //Include PTT via HRD
}

View File

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

View File

@ -178,21 +178,26 @@ vfo_t Rig::getVFO()
int Rig::setPTT(ptt_t ptt, vfo_t vfo)
{
if(m_hrd) {
/*
#ifdef WIN32
const wchar_t* cmnd = (const wchar_t*) (m_context +
"Set Button-Select Send 1").utf16();
wchar_t* cmnd;
if(ptt==0) {
cmnd = (wchar_t*) (m_context +
"Set Button-Select TX 0").utf16();
} else {
cmnd = (wchar_t*) (m_context +
"Set Button-Select TX 1").utf16();
}
const wchar_t* result=HRDInterfaceSendMessage(cmnd);
QString t2=QString::fromWCharArray (result,-1);
HRDInterfaceFreeString(result);
qDebug() << t2;
if(t2=="OK") {
return 0;
} else {
return -1;
}
#endif
*/
} else {
return rig_set_ptt(theRig, vfo, ptt);
}