1. Keyboard shortcuts Alt+1 to Alt+6 set next Tx message to 1-6.

2. SoundOut buffer size can be set by editing wsjtx.ini.
3. Fixed bug in placement of #ifdef in rigclass.cpp


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3313 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2013-05-24 12:36:41 +00:00
parent 2feb6bae81
commit 5068b1254d
5 changed files with 44 additions and 12 deletions

Binary file not shown.

View File

@ -17,6 +17,7 @@
int itone[85]; //Tx audio tones for 85 symbols
int icw[250]; //Dits for CW ID
int outBufSize;
int rc;
static int nc1=1;
wchar_t buffer[256];
@ -418,7 +419,7 @@ void MainWindow::writeSettings()
settings.setValue("pttData",m_pttData);
settings.setValue("LogQSOgeom",m_logQSOgeom);
settings.setValue("Polling",m_poll);
settings.setValue("OutBufSize",outBufSize);
settings.endGroup();
}
@ -533,6 +534,8 @@ void MainWindow::readSettings()
m_pttData=settings.value("pttData",false).toBool();
m_poll=settings.value("Polling",0).toInt();
m_logQSOgeom=settings.value("LogQSOgeom",QRect(500,400,424,283)).toRect();
outBufSize=settings.value("OutBufSize",4096).toInt();
settings.endGroup();
if(!ui->actionLinrad->isChecked() && !ui->actionCuteSDR->isChecked() &&
!ui->actionAFMHot->isChecked() && !ui->actionBlue->isChecked()) {
@ -774,6 +777,36 @@ void MainWindow::keyPressEvent( QKeyEvent *e ) //keyPressEvent
int n;
switch(e->key())
{
case Qt::Key_1:
if(e->modifiers() & Qt::AltModifier) {
ui->txrb1->setChecked(true);
break;
}
case Qt::Key_2:
if(e->modifiers() & Qt::AltModifier) {
ui->txrb2->setChecked(true);
break;
}
case Qt::Key_3:
if(e->modifiers() & Qt::AltModifier) {
ui->txrb3->setChecked(true);
break;
}
case Qt::Key_4:
if(e->modifiers() & Qt::AltModifier) {
ui->txrb4->setChecked(true);
break;
}
case Qt::Key_5:
if(e->modifiers() & Qt::AltModifier) {
ui->txrb5->setChecked(true);
break;
}
case Qt::Key_6:
if(e->modifiers() & Qt::AltModifier) {
ui->txrb6->setChecked(true);
break;
}
case Qt::Key_D:
if(e->modifiers() & Qt::ShiftModifier) {
if(!m_decoderBusy) {
@ -783,9 +816,6 @@ void MainWindow::keyPressEvent( QKeyEvent *e ) //keyPressEvent
}
}
break;
case Qt::Key_F3:
btxMute=!btxMute;
break;
case Qt::Key_F4:
ui->dxCallEntry->setText("");
ui->dxGridEntry->setText("");
@ -1139,8 +1169,7 @@ void MainWindow::on_actionKeyboard_shortcuts_triggered()
pShortcuts->setReadOnly(true);
pShortcuts->setFontPointSize(10);
pShortcuts->setWindowTitle("Keyboard Shortcuts");
// pShortcuts->setGeometry(m_wideGraphGeom);
pShortcuts->setGeometry(QRect(45,50,430,420));
pShortcuts->setGeometry(QRect(45,50,430,440));
Qt::WindowFlags flags = Qt::WindowCloseButtonHint |
Qt::WindowMinimizeButtonHint;
pShortcuts->setWindowFlags(flags);

View File

@ -79,8 +79,8 @@ int Rig::init(rig_model_t rig_model)
int Rig::open(int n) {
m_hrd=(n==9999);
if(m_hrd) {
#ifdef WIN32
if(m_hrd) {
bool bConnect=false;
bConnect = HRDInterfaceConnect(L"localhost",7809);
if(bConnect) {
@ -92,10 +92,12 @@ int Rig::open(int n) {
m_hrd=false;
return -1;
}
#endif
} else {
return rig_open(theRig);
}
#else
return rig_open(theRig);
#endif
}
int Rig::close(void) {

View File

@ -1,6 +1,6 @@
#include "soundout.h"
#define FRAMES_PER_BUFFER 1024
//#define FRAMES_PER_BUFFER 1024
extern "C" {
#include <portaudio.h>
@ -9,6 +9,7 @@ extern "C" {
extern float gran(); //Noise generator (for tests only)
extern int itone[85]; //Tx audio tones for 85 symbols
extern int icw[250]; //Dits for CW ID
extern int outBufSize;
extern bool btxok;
extern bool btxMute;
extern double outputLatency;
@ -166,7 +167,7 @@ void SoundOutThread::run()
NULL, //No input parameters
&outParam, //Output parameters
48000.0, //Sample rate
FRAMES_PER_BUFFER, //Frames per buffer
outBufSize, //Frames per buffer
paClipOff, //No clipping
d2aCallback, //output callbeck routine
&udata); //userdata
@ -196,7 +197,7 @@ void SoundOutThread::run()
m_SamFacOut=1.0;
if(udata.ncall>400) {
qint64 ms = QDateTime::currentMSecsSinceEpoch();
m_SamFacOut=udata.ncall*FRAMES_PER_BUFFER*1000.0/(48000.0*(ms-ms0-50));
m_SamFacOut=udata.ncall*outBufSize*1000.0/(48000.0*(ms-ms0-50));
}
msleep(100);
}

View File

@ -1,6 +1,6 @@
[Setup]
AppName=wsjtx
AppVerName=wsjtx Version 0.99 r3297
AppVerName=wsjtx Version 0.99 r3313
AppCopyright=Copyright (C) 2001-2013 by Joe Taylor, K1JT
DefaultDirName=c:\wsjtx
DefaultGroupName=wsjtx