Reports -1 to -9 displayed as -01 to -09 in Tx messages.

Save/restore band setting on program restart.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3090 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2013-03-25 01:39:20 +00:00
parent 3362a37672
commit 3370bef7b7
2 changed files with 7 additions and 3 deletions

View File

@ -346,6 +346,7 @@ void MainWindow::writeSettings()
settings.setValue("StopBitsIndex",m_stopBitsIndex); settings.setValue("StopBitsIndex",m_stopBitsIndex);
settings.setValue("Handshake",m_handshake); settings.setValue("Handshake",m_handshake);
settings.setValue("HandshakeIndex",m_handshakeIndex); settings.setValue("HandshakeIndex",m_handshakeIndex);
settings.setValue("BandIndex",m_band);
settings.endGroup(); settings.endGroup();
} }
@ -432,6 +433,8 @@ void MainWindow::readSettings()
m_stopBitsIndex=settings.value("StopBitsIndex",1).toInt(); m_stopBitsIndex=settings.value("StopBitsIndex",1).toInt();
m_handshake=settings.value("Handshake","None").toString(); m_handshake=settings.value("Handshake","None").toString();
m_handshakeIndex=settings.value("HandshakeIndex",0).toInt(); m_handshakeIndex=settings.value("HandshakeIndex",0).toInt();
m_band=settings.value("BandIndex",7).toInt();
ui->bandComboBox->setCurrentIndex(m_band);
settings.endGroup(); settings.endGroup();
@ -1639,6 +1642,7 @@ void MainWindow::doubleClickOnCall(bool shift, bool ctrl)
int nr=rpt.toInt(); int nr=rpt.toInt();
if(nr<-50) rpt="-50"; if(nr<-50) rpt="-50";
if(nr>49) rpt="+49"; if(nr>49) rpt="+49";
if(nr>=-9 and nr<=-1) rpt="-0" + rpt.mid(1);
if(nr>=0 and nr<=9) rpt="+0" + rpt; if(nr>=0 and nr<=9) rpt="+0" + rpt;
if(nr>=10) rpt="+" + rpt; if(nr>=10) rpt="+" + rpt;
genStdMsgs(rpt); genStdMsgs(rpt);

View File

@ -43,7 +43,7 @@ extern "C" int d2aCallback(const void *inputBuffer, void *outputBuffer,
static double fac; static double fac;
static int ic=0,j=0; static int ic=0,j=0;
static short int i2; static short int i2;
int isym; int isym,nspd;
udata->ncall++; udata->ncall++;
if(udata->bRestart) { if(udata->bRestart) {
@ -67,8 +67,8 @@ extern "C" int d2aCallback(const void *inputBuffer, void *outputBuffer,
dphi=twopi*freq/48000.0; dphi=twopi*freq/48000.0;
// float wpm=20.0; // float wpm=20.0;
// int nspd=1.2*48000.0/wpm; // int nspd=1.2*48000.0/wpm;
int nspd=3072; //18.75 wpm // nspd=3072; //18.75 wpm
nspd=2048; nspd=2048; //28.125 wpm
int ic0=85*4*udata->nsps; int ic0=85*4*udata->nsps;
for(int i=0 ; i<framesToProcess; i++ ) { for(int i=0 ; i<framesToProcess; i++ ) {
phi += dphi; phi += dphi;