mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-09-04 06:07:50 -04:00
Correct a logic error in activating the PTTtest button.
Disable attempted control of T/R switching via HRD: it does not work, as coded. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3311 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
c4e6f89b0b
commit
612504ef27
11
devsetup.cpp
11
devsetup.cpp
@ -522,8 +522,11 @@ void DevSetup::enableWidgets()
|
|||||||
ui.label_25->setEnabled(bSerial);
|
ui.label_25->setEnabled(bSerial);
|
||||||
|
|
||||||
ui.pollSpinBox->setEnabled(m_catEnabled);
|
ui.pollSpinBox->setEnabled(m_catEnabled);
|
||||||
bool b=(m_pttMethodIndex==1 or m_pttMethodIndex==2) and m_rig!=9999;
|
bool b1=(m_pttMethodIndex==1 or m_pttMethodIndex==2);
|
||||||
ui.pttComboBox->setEnabled(b);
|
ui.pttComboBox->setEnabled(b1);
|
||||||
b=b or (m_catEnabled and m_pttMethodIndex==0);
|
bool b2 = (m_catEnabled and m_pttMethodIndex==1 and m_rig!=9999) or
|
||||||
ui.testPTTButton->setEnabled(b);
|
(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);
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -178,18 +178,21 @@ vfo_t Rig::getVFO()
|
|||||||
int Rig::setPTT(ptt_t ptt, vfo_t vfo)
|
int Rig::setPTT(ptt_t ptt, vfo_t vfo)
|
||||||
{
|
{
|
||||||
if(m_hrd) {
|
if(m_hrd) {
|
||||||
|
/*
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
const wchar_t* cmnd = (const wchar_t*) (m_context +
|
const wchar_t* cmnd = (const wchar_t*) (m_context +
|
||||||
"Set Button-Select Send 1").utf16();
|
"Set Button-Select Send 1").utf16();
|
||||||
const wchar_t* result=HRDInterfaceSendMessage(cmnd);
|
const wchar_t* result=HRDInterfaceSendMessage(cmnd);
|
||||||
QString t2=QString::fromWCharArray (result,-1);
|
QString t2=QString::fromWCharArray (result,-1);
|
||||||
HRDInterfaceFreeString(result);
|
HRDInterfaceFreeString(result);
|
||||||
|
qDebug() << t2;
|
||||||
if(t2=="OK") {
|
if(t2=="OK") {
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
*/
|
||||||
} else {
|
} else {
|
||||||
return rig_set_ptt(theRig, vfo, ptt);
|
return rig_set_ptt(theRig, vfo, ptt);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user