mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-05-23 18:02:29 -04: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 itone[85]; //Tx audio tones for 85 symbols
|
||||||
int icw[250]; //Dits for CW ID
|
int icw[250]; //Dits for CW ID
|
||||||
|
int outBufSize;
|
||||||
int rc;
|
int rc;
|
||||||
static int nc1=1;
|
static int nc1=1;
|
||||||
wchar_t buffer[256];
|
wchar_t buffer[256];
|
||||||
@ -418,7 +419,7 @@ void MainWindow::writeSettings()
|
|||||||
settings.setValue("pttData",m_pttData);
|
settings.setValue("pttData",m_pttData);
|
||||||
settings.setValue("LogQSOgeom",m_logQSOgeom);
|
settings.setValue("LogQSOgeom",m_logQSOgeom);
|
||||||
settings.setValue("Polling",m_poll);
|
settings.setValue("Polling",m_poll);
|
||||||
|
settings.setValue("OutBufSize",outBufSize);
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -533,6 +534,8 @@ void MainWindow::readSettings()
|
|||||||
m_pttData=settings.value("pttData",false).toBool();
|
m_pttData=settings.value("pttData",false).toBool();
|
||||||
m_poll=settings.value("Polling",0).toInt();
|
m_poll=settings.value("Polling",0).toInt();
|
||||||
m_logQSOgeom=settings.value("LogQSOgeom",QRect(500,400,424,283)).toRect();
|
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() &&
|
if(!ui->actionLinrad->isChecked() && !ui->actionCuteSDR->isChecked() &&
|
||||||
!ui->actionAFMHot->isChecked() && !ui->actionBlue->isChecked()) {
|
!ui->actionAFMHot->isChecked() && !ui->actionBlue->isChecked()) {
|
||||||
@ -774,6 +777,36 @@ void MainWindow::keyPressEvent( QKeyEvent *e ) //keyPressEvent
|
|||||||
int n;
|
int n;
|
||||||
switch(e->key())
|
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:
|
case Qt::Key_D:
|
||||||
if(e->modifiers() & Qt::ShiftModifier) {
|
if(e->modifiers() & Qt::ShiftModifier) {
|
||||||
if(!m_decoderBusy) {
|
if(!m_decoderBusy) {
|
||||||
@ -783,9 +816,6 @@ void MainWindow::keyPressEvent( QKeyEvent *e ) //keyPressEvent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Qt::Key_F3:
|
|
||||||
btxMute=!btxMute;
|
|
||||||
break;
|
|
||||||
case Qt::Key_F4:
|
case Qt::Key_F4:
|
||||||
ui->dxCallEntry->setText("");
|
ui->dxCallEntry->setText("");
|
||||||
ui->dxGridEntry->setText("");
|
ui->dxGridEntry->setText("");
|
||||||
@ -1139,8 +1169,7 @@ void MainWindow::on_actionKeyboard_shortcuts_triggered()
|
|||||||
pShortcuts->setReadOnly(true);
|
pShortcuts->setReadOnly(true);
|
||||||
pShortcuts->setFontPointSize(10);
|
pShortcuts->setFontPointSize(10);
|
||||||
pShortcuts->setWindowTitle("Keyboard Shortcuts");
|
pShortcuts->setWindowTitle("Keyboard Shortcuts");
|
||||||
// pShortcuts->setGeometry(m_wideGraphGeom);
|
pShortcuts->setGeometry(QRect(45,50,430,440));
|
||||||
pShortcuts->setGeometry(QRect(45,50,430,420));
|
|
||||||
Qt::WindowFlags flags = Qt::WindowCloseButtonHint |
|
Qt::WindowFlags flags = Qt::WindowCloseButtonHint |
|
||||||
Qt::WindowMinimizeButtonHint;
|
Qt::WindowMinimizeButtonHint;
|
||||||
pShortcuts->setWindowFlags(flags);
|
pShortcuts->setWindowFlags(flags);
|
||||||
|
@ -79,8 +79,8 @@ int Rig::init(rig_model_t rig_model)
|
|||||||
|
|
||||||
int Rig::open(int n) {
|
int Rig::open(int n) {
|
||||||
m_hrd=(n==9999);
|
m_hrd=(n==9999);
|
||||||
if(m_hrd) {
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
if(m_hrd) {
|
||||||
bool bConnect=false;
|
bool bConnect=false;
|
||||||
bConnect = HRDInterfaceConnect(L"localhost",7809);
|
bConnect = HRDInterfaceConnect(L"localhost",7809);
|
||||||
if(bConnect) {
|
if(bConnect) {
|
||||||
@ -92,10 +92,12 @@ int Rig::open(int n) {
|
|||||||
m_hrd=false;
|
m_hrd=false;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
return rig_open(theRig);
|
return rig_open(theRig);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
return rig_open(theRig);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int Rig::close(void) {
|
int Rig::close(void) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "soundout.h"
|
#include "soundout.h"
|
||||||
|
|
||||||
#define FRAMES_PER_BUFFER 1024
|
//#define FRAMES_PER_BUFFER 1024
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include <portaudio.h>
|
#include <portaudio.h>
|
||||||
@ -9,6 +9,7 @@ extern "C" {
|
|||||||
extern float gran(); //Noise generator (for tests only)
|
extern float gran(); //Noise generator (for tests only)
|
||||||
extern int itone[85]; //Tx audio tones for 85 symbols
|
extern int itone[85]; //Tx audio tones for 85 symbols
|
||||||
extern int icw[250]; //Dits for CW ID
|
extern int icw[250]; //Dits for CW ID
|
||||||
|
extern int outBufSize;
|
||||||
extern bool btxok;
|
extern bool btxok;
|
||||||
extern bool btxMute;
|
extern bool btxMute;
|
||||||
extern double outputLatency;
|
extern double outputLatency;
|
||||||
@ -166,7 +167,7 @@ void SoundOutThread::run()
|
|||||||
NULL, //No input parameters
|
NULL, //No input parameters
|
||||||
&outParam, //Output parameters
|
&outParam, //Output parameters
|
||||||
48000.0, //Sample rate
|
48000.0, //Sample rate
|
||||||
FRAMES_PER_BUFFER, //Frames per buffer
|
outBufSize, //Frames per buffer
|
||||||
paClipOff, //No clipping
|
paClipOff, //No clipping
|
||||||
d2aCallback, //output callbeck routine
|
d2aCallback, //output callbeck routine
|
||||||
&udata); //userdata
|
&udata); //userdata
|
||||||
@ -196,7 +197,7 @@ void SoundOutThread::run()
|
|||||||
m_SamFacOut=1.0;
|
m_SamFacOut=1.0;
|
||||||
if(udata.ncall>400) {
|
if(udata.ncall>400) {
|
||||||
qint64 ms = QDateTime::currentMSecsSinceEpoch();
|
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);
|
msleep(100);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[Setup]
|
[Setup]
|
||||||
AppName=wsjtx
|
AppName=wsjtx
|
||||||
AppVerName=wsjtx Version 0.99 r3297
|
AppVerName=wsjtx Version 0.99 r3313
|
||||||
AppCopyright=Copyright (C) 2001-2013 by Joe Taylor, K1JT
|
AppCopyright=Copyright (C) 2001-2013 by Joe Taylor, K1JT
|
||||||
DefaultDirName=c:\wsjtx
|
DefaultDirName=c:\wsjtx
|
||||||
DefaultGroupName=wsjtx
|
DefaultGroupName=wsjtx
|
||||||
|
Loading…
x
Reference in New Issue
Block a user