mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
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:
parent
2feb6bae81
commit
5068b1254d
Binary file not shown.
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user