mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-23 20:58:55 -05:00
Cleanup of code. Temporary simple definition of BPSK signal with
rectangular pulses. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/jtms3@2484 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
1866a937e4
commit
b1fd11b06b
@ -20,13 +20,6 @@ DevSetup::~DevSetup()
|
||||
void DevSetup::initDlg()
|
||||
{
|
||||
int k,id;
|
||||
int valid_devices=0;
|
||||
int minChan[MAXDEVICES];
|
||||
int maxChan[MAXDEVICES];
|
||||
int minSpeed[MAXDEVICES];
|
||||
int maxSpeed[MAXDEVICES];
|
||||
char hostAPI_DeviceName[MAXDEVICES][50];
|
||||
char s[60];
|
||||
int numDevices=Pa_GetDeviceCount();
|
||||
|
||||
const PaDeviceInfo *pdi;
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
QT += core gui network
|
||||
CONFIG += qwt thread
|
||||
#CONFIG += console
|
||||
CONFIG += console
|
||||
|
||||
TARGET = jtms3
|
||||
VERSION = 0.1
|
||||
|
@ -19,7 +19,25 @@ subroutine genjtms3(msg,msgsent,iwave,nwave)
|
||||
enddo
|
||||
|
||||
call scr258(isync,datsym,1,chansym) !Insert sync and data into chansym(258)
|
||||
call genjtms3a(chansym,258,iwave,nwave)
|
||||
|
||||
twopi=8.0*atan(1.0)
|
||||
f0=1500.0
|
||||
dphi=twopi*f0/48000.0
|
||||
phi=0.
|
||||
k=0
|
||||
do j=1,258
|
||||
do i=1,24
|
||||
phi=phi+dphi
|
||||
if(phi.gt.twopi) phi=phi-twopi
|
||||
n=32767.0*sin(phi)
|
||||
if(chansym(j).eq.0) n=-n
|
||||
k=k+1
|
||||
iwave(k)=n
|
||||
enddo
|
||||
enddo
|
||||
nwave=k
|
||||
|
||||
! call genjtms3a(chansym,258,iwave,nwave)
|
||||
msgsent=msg
|
||||
|
||||
return
|
||||
|
@ -406,23 +406,8 @@ void MainWindow::readSettings()
|
||||
//-------------------------------------------------------------- dataSink()
|
||||
void MainWindow::dataSink(int k)
|
||||
{
|
||||
static float s[NFFT],splot[NFFT];
|
||||
static int n=0;
|
||||
static int ihsym=0;
|
||||
static int nzap=0;
|
||||
static int n60z=0;
|
||||
static int nkhz;
|
||||
static int nfsample=96000;
|
||||
static int nxpol=0;
|
||||
static float fgreen;
|
||||
static int ndiskdat;
|
||||
static int nb;
|
||||
static int nadj=0;
|
||||
static float px=0.0,py=0.0;
|
||||
static uchar lstrong[1024];
|
||||
static float rejectx;
|
||||
static float rejecty;
|
||||
static float slimit;
|
||||
static float px=0.0;
|
||||
|
||||
if(m_diskData) {
|
||||
ndiskdat=1;
|
||||
@ -1205,12 +1190,6 @@ void MainWindow::guiUpdate()
|
||||
|
||||
ba2msg(ba,message);
|
||||
int len1=22;
|
||||
/*
|
||||
//### Wrong mode!
|
||||
int mode65=m_mode65;
|
||||
double samfac=1.0;
|
||||
gen65_(message,&mode65,&samfac,&nsendingsh,msgsent,iwave,&nwave,len1,len1);
|
||||
*/
|
||||
genjtms3_(message,msgsent,iwave,&nwave,len1,len1);
|
||||
msgsent[22]=0;
|
||||
|
||||
|
@ -73,7 +73,6 @@ void CPlotter::resizeEvent(QResizeEvent* ) //resizeEvent()
|
||||
void CPlotter::paintEvent(QPaintEvent *) // paintEvent()
|
||||
{
|
||||
static int x00=-99;
|
||||
int ihr,imin;
|
||||
|
||||
if(m_paintEventBusy) return;
|
||||
m_paintEventBusy=true;
|
||||
@ -135,8 +134,7 @@ void CPlotter::paintEvent(QPaintEvent *) // paintEvent()
|
||||
|
||||
void CPlotter::draw(float s[], int i0, float splot[]) //draw()
|
||||
{
|
||||
int i,j,k,w,h;
|
||||
int ihr,imin;
|
||||
int i,j,w,h;
|
||||
float y;
|
||||
|
||||
m_i0=i0;
|
||||
|
@ -34,7 +34,7 @@ extern "C" int a2dCallback( const void *inputBuffer, void *outputBuffer,
|
||||
(void) outputBuffer; //Prevent unused variable warnings.
|
||||
(void) timeInfo;
|
||||
(void) userData;
|
||||
int nbytes,i,j,k;
|
||||
int nbytes,k;
|
||||
|
||||
// if(framesToProcess != -99) return paContinue; //###
|
||||
|
||||
|
10
soundout.cpp
10
soundout.cpp
@ -26,12 +26,8 @@ extern "C" int d2aCallback(const void *inputBuffer, void *outputBuffer,
|
||||
{
|
||||
paUserData *udata=(paUserData*)userData;
|
||||
short *wptr = (short*)outputBuffer;
|
||||
unsigned int i,n;
|
||||
unsigned int i;
|
||||
static int ic=0;
|
||||
static bool btxok0=false;
|
||||
static int nminStart=0;
|
||||
double tsec,tstart;
|
||||
int nsec;
|
||||
|
||||
for(i=0 ; i<framesToProcess; i++ ) {
|
||||
short int i2=iwave[ic];
|
||||
@ -39,11 +35,9 @@ extern "C" int d2aCallback(const void *inputBuffer, void *outputBuffer,
|
||||
// i2 = 500.0*(i2/32767.0 + 5.0*gran()); //Add noise (tests only!)
|
||||
if(!btxok) i2=0;
|
||||
*wptr++ = i2; //left
|
||||
// *wptr++ = i2; //right
|
||||
ic++;
|
||||
}
|
||||
if(ic > nwave) {
|
||||
// btxok=0;
|
||||
if(ic >= nwave) {
|
||||
ic=0;
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user