From 3370bef7b7a53ec9dccc8e30c818ff1f09caa449 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 25 Mar 2013 01:39:20 +0000 Subject: [PATCH] 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 --- mainwindow.cpp | 4 ++++ soundout.cpp | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 38535632e..338f06c8c 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -346,6 +346,7 @@ void MainWindow::writeSettings() settings.setValue("StopBitsIndex",m_stopBitsIndex); settings.setValue("Handshake",m_handshake); settings.setValue("HandshakeIndex",m_handshakeIndex); + settings.setValue("BandIndex",m_band); settings.endGroup(); } @@ -432,6 +433,8 @@ void MainWindow::readSettings() m_stopBitsIndex=settings.value("StopBitsIndex",1).toInt(); m_handshake=settings.value("Handshake","None").toString(); m_handshakeIndex=settings.value("HandshakeIndex",0).toInt(); + m_band=settings.value("BandIndex",7).toInt(); + ui->bandComboBox->setCurrentIndex(m_band); settings.endGroup(); @@ -1639,6 +1642,7 @@ void MainWindow::doubleClickOnCall(bool shift, bool ctrl) int nr=rpt.toInt(); if(nr<-50) rpt="-50"; 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>=10) rpt="+" + rpt; genStdMsgs(rpt); diff --git a/soundout.cpp b/soundout.cpp index 5ca186c23..3a50ae3c1 100644 --- a/soundout.cpp +++ b/soundout.cpp @@ -43,7 +43,7 @@ extern "C" int d2aCallback(const void *inputBuffer, void *outputBuffer, static double fac; static int ic=0,j=0; static short int i2; - int isym; + int isym,nspd; udata->ncall++; if(udata->bRestart) { @@ -67,8 +67,8 @@ extern "C" int d2aCallback(const void *inputBuffer, void *outputBuffer, dphi=twopi*freq/48000.0; // float wpm=20.0; // int nspd=1.2*48000.0/wpm; - int nspd=3072; //18.75 wpm - nspd=2048; +// nspd=3072; //18.75 wpm + nspd=2048; //28.125 wpm int ic0=85*4*udata->nsps; for(int i=0 ; i