Backed out the changes from r3171 to r3172 -- too buggy at present.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3173 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2013-04-15 21:13:31 +00:00
parent 6ebfd25e27
commit 0577b42f43
7 changed files with 986 additions and 1134 deletions

View File

@ -14,9 +14,6 @@ DevSetup::DevSetup(QWidget *parent) : QDialog(parent)
m_restartSoundIn=false;
m_restartSoundOut=false;
m_firstCall=true;
m_count=0;
m_iptt=0;
m_bRigOpen=false;
}
DevSetup::~DevSetup()
@ -372,38 +369,3 @@ void DevSetup::on_cbID73_toggled(bool checked)
{
m_After73=checked;
}
void DevSetup::on_testCATButton_clicked()
{
if(!m_catEnabled) return;
if(!m_bRigOpen) {
QString conf_parms;
conf_parms.sprintf("data_bits=%d,stop_bits=%d,serial_handshake=",
m_dataBits,m_stopBits);
conf_parms+=m_handshake;
int iret=rigOpen(0,m_rig,m_catPort.toAscii().data(),m_serialRate,
conf_parms.toAscii().data());
if(iret!=0) {
msgBox("Failed to open connection to radio.");
return;
}
m_bRigOpen=true;
}
m_count=1-m_count;
int freq=10130000;
if(m_count!=1) freq=14078000;
rigSetFreq(freq);
}
void DevSetup::on_testPTTButton_clicked()
{
int iret=0;
m_iptt=1-m_iptt;
if(m_pttMethodIndex==1 or m_pttMethodIndex==2) {
int iptt=m_iptt;
ptt(m_pttPort,iptt,&m_iptt,&m_COMportOpen);
}
if(m_pttMethodIndex==0 and m_bRigOpen) {
iret=rigSetPTT(m_iptt);
}
}

View File

@ -34,9 +34,6 @@ public:
qint32 m_stopBits;
qint32 m_stopBitsIndex;
qint32 m_handshakeIndex;
qint32 m_count;
qint32 m_iptt;
qint32 m_COMportOpen;
bool m_restartSoundIn;
bool m_restartSoundOut;
@ -44,7 +41,6 @@ public:
bool m_firstCall;
bool m_catEnabled;
bool m_After73;
bool m_bRigOpen;
QString m_myCall;
QString m_myGrid;
@ -78,9 +74,6 @@ private slots:
void on_stopBitsComboBox_activated(int index);
void on_rigComboBox_activated(int index);
void on_cbID73_toggled(bool checked);
void on_testCATButton_clicked();
void on_testPTTButton_clicked();
private:
void msgBox(QString t);

File diff suppressed because it is too large Load Diff

View File

@ -23,9 +23,6 @@ int set_conf(RIG *my_rig, char *conf_parms)
*q++ = '\0';
n = strchr(q, ',');
if (n) *n++ = '\0';
printf("%s %s\n",p,q);
iret = rig_set_conf(my_rig, rig_token_lookup(my_rig, p), q);
if (iret != RIG_OK)
return iret;

View File

@ -177,7 +177,6 @@ MainWindow::MainWindow(QSharedMemory *shdmem, QWidget *parent) :
m_watchdogLimit=5;
m_tune=false;
m_repeatMsg=0;
m_bRigOpen=false;
decodeBusy(false);
ui->xThermo->setFillBrush(Qt::green);
@ -286,23 +285,6 @@ MainWindow::MainWindow(QSharedMemory *shdmem, QWidget *parent) :
}
}
#endif
//###
if(m_catEnabled) {
QString conf_parms;
conf_parms.sprintf("data_bits=%d,stop_bits=%d,serial_handshake=",
m_dataBits,m_stopBits);
conf_parms+=m_handshake;
int iret=rigOpen(0,m_rig,m_catPort.toAscii().data(),m_serialRate,
conf_parms.toAscii().data());
if(iret!=0) {
msgBox("Failed to open connection to radio.");
return;
}
m_bRigOpen=true;
}
//###
} // End of MainWindow constructor
//--------------------------------------------------- MainWindow destructor
@ -617,7 +599,6 @@ void MainWindow::on_actionDeviceSetup_triggered() //Setup Dialog
dlg.m_stopBitsIndex=m_stopBitsIndex;
dlg.m_handshake=m_handshake;
dlg.m_handshakeIndex=m_handshakeIndex;
dlg.m_bRigOpen=m_bRigOpen;
dlg.initDlg();
if(dlg.exec() == QDialog::Accepted) {
@ -646,7 +627,6 @@ void MainWindow::on_actionDeviceSetup_triggered() //Setup Dialog
m_stopBitsIndex=dlg.m_stopBitsIndex;
m_handshake=dlg.m_handshake;
m_handshakeIndex=dlg.m_handshakeIndex;
m_bRigOpen=dlg.m_bRigOpen;
#ifdef WIN32
if(dlg.m_pskReporter!=m_pskReporter) {
@ -1426,8 +1406,8 @@ void MainWindow::guiUpdate()
//Raise PTT
if(m_pttMethodIndex==0) { //CAT control for PTT
m_cmnd=rig_command() + " T 1";
// p3.start(m_cmnd);
// p3.waitForFinished();
p3.start(m_cmnd);
p3.waitForFinished();
m_iptt=1;
}
if(m_pttMethodIndex==1 or m_pttMethodIndex==2) { //DTR or RTS
@ -1559,8 +1539,8 @@ void MainWindow::guiUpdate()
//Lower PTT
if(m_pttMethodIndex==0) { //CAT
m_cmnd=rig_command() + " T 0";
// p3.start(m_cmnd);
// p3.waitForFinished();
p3.start(m_cmnd);
p3.waitForFinished();
}
if(m_pttMethodIndex==1 or m_pttMethodIndex==2) { //DTR-RTS
ptt(m_pttPort,0,&m_iptt,&m_COMportOpen);
@ -1618,20 +1598,12 @@ void MainWindow::guiUpdate()
}
m_hsym0=khsym;
m_sec0=nsec;
/*
if(m_catEnabled) {
m_cmnd=rig_command() + " f";
p3.start(m_cmnd);
p3.waitForFinished();
}
*/
if(m_bRigOpen) {
int fHz;
int iret=rigFreq(&fHz);
double fMHz=fHz/1000000.0;
int d=1000000.0*(fMHz-m_dialFreq);
if(abs(d)>0) dialFreqChanged2(fMHz);
}
}
iptt0=m_iptt;
@ -1703,8 +1675,8 @@ void MainWindow::stopTx2()
//Lower PTT
if(m_pttMethodIndex==0) {
m_cmnd=rig_command() + " T 0";
// p3.start(m_cmnd);
// p3.waitForFinished();
p3.start(m_cmnd);
p3.waitForFinished();
}
if(m_pttMethodIndex==1 or m_pttMethodIndex==2) {
ptt(m_pttPort,0,&m_iptt,&m_COMportOpen);
@ -2435,9 +2407,8 @@ void MainWindow::on_bandComboBox_currentIndexChanged(int index)
m_dialFreq=t.toDouble();
dialFreqChanged2(m_dialFreq);
m_repeatMsg=0;
int nHz=int(1000000.0*m_dialFreq + 0.5);
/*
if(m_catEnabled) {
int nHz=int(1000000.0*m_dialFreq + 0.5);
QString cmnd1,cmnd3;
cmnd1=rig_command();
cmnd3.sprintf(" F %d",nHz);
@ -2445,9 +2416,6 @@ void MainWindow::on_bandComboBox_currentIndexChanged(int index)
p3.start(m_cmnd);
p3.waitForFinished();
}
*/
if(m_bRigOpen) rigSetFreq(nHz);
}
void MainWindow::on_actionPrompt_to_log_QSO_triggered(bool checked)

View File

@ -247,7 +247,6 @@ private:
bool m_runaway;
bool m_tx2QSO;
bool m_tune;
bool m_bRigOpen;
char m_decoded[80];
@ -342,7 +341,7 @@ extern int killbyname(const char* progName);
extern void getDev(int* numDevices,char hostAPI_DeviceName[][50],
int minChan[], int maxChan[],
int minSpeed[], int maxSpeed[]);
extern int ptt(int nport, int itx, int* iptt, int* nopen);
extern int ptt(int nport, int itx, int* iptt);
//extern int ReporterInitialize(char* hostname, char* port);
@ -366,13 +365,9 @@ void morse_(char* msg, int* icw, int* ncw, int len);
//void rig_control(int nrig, int verbose);
int rigOpen(int vervose, int nrig, const char* rig_file, int serial_rate,
const char* conf_parms);
int rigOpen(int nrig, int verbose);
void rigSetFreq(int fHz);
int rigFreq(int *fHz);
int rigSetPTT(int iptt);
void rigClose();
int rigFreq();
}

View File

@ -2097,7 +2097,7 @@ answer callers</string>
</action>
<action name="actionDeviceSetup">
<property name="checkable">
<bool>false</bool>
<bool>true</bool>
</property>
<property name="text">
<string>Configuration</string>