mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-27 14:48:46 -05:00
Removing GUI widgets not needed fot JTMS3.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/jtms3@2490 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
52172ce346
commit
4b4ee6a6da
33
commons.h
33
commons.h
@ -6,40 +6,9 @@
|
||||
extern "C" {
|
||||
|
||||
extern struct { //This is "common/datcom/..." in Fortran
|
||||
float d2[30*48000]; //Raw data
|
||||
short int d2[30*48000]; //Raw data
|
||||
int kin;
|
||||
int ndiskdat;
|
||||
/*
|
||||
float ss[4*322*NFFT]; //Half-symbol spectra at 0,45,90,135 deg pol
|
||||
float savg[4*NFFT]; //Avg spectra at 0,45,90,135 deg pol
|
||||
double fcenter; //Center freq from Linrad (MHz)
|
||||
int nutc; //UTC as integer, HHMM
|
||||
int idphi; //Phase correction for Y pol'n, degrees
|
||||
int mousedf; //User-selected DF
|
||||
int mousefqso; //User-selected QSO freq (kHz)
|
||||
int nagain; //1 ==> decode only at fQSO +/- Tol
|
||||
int ndepth; //How much hinted decoding to do?
|
||||
int ndiskdat; //1 ==> data read from *.tf2 or *.iq file
|
||||
int neme; //Hinted decoding tries only for EME calls
|
||||
int newdat; //1 ==> new data, must do long FFT
|
||||
int nfa; //Low decode limit (kHz)
|
||||
int nfb; //High decode limit (kHz)
|
||||
int nfcal; //Frequency correction, for calibration (Hz)
|
||||
int nfshift; //Shift of displayed center freq (kHz)
|
||||
int mcall3; //1 ==> CALL3.TXT has been modified
|
||||
int ntimeout; //Max for timeouts in Messages and BandMap
|
||||
int ntol; //+/- decoding range around fQSO (Hz)
|
||||
int nxant; //1 ==> add 45 deg to measured pol angle
|
||||
int map65RxLog; //Flags to control log files
|
||||
int nfsample; //Input sample rate
|
||||
int nxpol; //1 if using xpol antennas, 0 otherwise
|
||||
int mode65; //JT65 sub-mode: A=1, B=2, C=4
|
||||
char mycall[12];
|
||||
char mygrid[6];
|
||||
char hiscall[12];
|
||||
char hisgrid[6];
|
||||
char datetime[20];
|
||||
*/
|
||||
} datcom_;
|
||||
}
|
||||
|
||||
|
43
getfile.cpp
43
getfile.cpp
@ -25,6 +25,22 @@ void getfile(QString fname, bool xpol, int dbDgrd)
|
||||
|
||||
void savewav(QString fname)
|
||||
{
|
||||
struct {
|
||||
char ariff[4];
|
||||
int nchunk;
|
||||
char awave[4];
|
||||
char afmt[4];
|
||||
int lenfmt;
|
||||
short int nfmt2;
|
||||
short int nchan2;
|
||||
int nsamrate;
|
||||
int nbytesec;
|
||||
short int nbytesam2;
|
||||
short int nbitsam2;
|
||||
char adata[4];
|
||||
int ndata;
|
||||
} hdr;
|
||||
|
||||
int npts=30*48000;
|
||||
// qint16* buf=(qint16*)malloc(2*npts);
|
||||
char name[80];
|
||||
@ -33,8 +49,33 @@ void savewav(QString fname)
|
||||
|
||||
if(fp != NULL) {
|
||||
// Write a WAV header
|
||||
// fwrite(&datcom_.fcenter,sizeof(datcom_.fcenter),1,fp);
|
||||
hdr.ariff[0]='R';
|
||||
hdr.ariff[1]='I';
|
||||
hdr.ariff[2]='F';
|
||||
hdr.ariff[3]='F';
|
||||
hdr.nchunk=0;
|
||||
hdr.awave[0]='W';
|
||||
hdr.awave[0]='A';
|
||||
hdr.awave[0]='V';
|
||||
hdr.awave[0]='E';
|
||||
hdr.afmt[0]='f';
|
||||
hdr.afmt[1]='m';
|
||||
hdr.afmt[2]='t';
|
||||
hdr.afmt[3]=' ';
|
||||
hdr.lenfmt=16;
|
||||
hdr.nfmt2=1;
|
||||
hdr.nchan2=1;
|
||||
hdr.nsamrate=48000;
|
||||
hdr.nbytesec=2*48000;
|
||||
hdr.nbytesam2=2;
|
||||
hdr.nbitsam2=16;
|
||||
hdr.adata[0]='d';
|
||||
hdr.adata[1]='a';
|
||||
hdr.adata[2]='t';
|
||||
hdr.adata[3]='a';
|
||||
hdr.ndata=2*npts;
|
||||
|
||||
fwrite(&hdr,sizeof(hdr),1,fp);
|
||||
// memcpy(datcom_.d2,buf,2*npts);
|
||||
// fwrite(buf,2,npts,fp);
|
||||
fwrite(datcom_.d2,2,npts,fp);
|
||||
|
@ -174,7 +174,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
border-style: outset; border-width: 1px; border-radius: 5px; \
|
||||
border-color: black; min-width: 5em; padding: 3px;}";
|
||||
|
||||
genStdMsgs("");
|
||||
genStdMsgs("-26");
|
||||
|
||||
on_actionWide_Waterfall_triggered(); //###
|
||||
if(m_mode=="JT65A") on_actionJT65A_triggered();
|
||||
@ -401,6 +401,8 @@ void MainWindow::dataSink(int k)
|
||||
static int nwrite=0;
|
||||
static int k0=99999999;
|
||||
static float px=0.0;
|
||||
static float sq0=0.0;
|
||||
static float sqave=1000.0;
|
||||
|
||||
if(k < k0) {
|
||||
nwrite=0;
|
||||
@ -414,13 +416,17 @@ void MainWindow::dataSink(int k)
|
||||
datcom_.ndiskdat=0;
|
||||
}
|
||||
|
||||
double sq=0.0;
|
||||
float sq=0.0;
|
||||
float x;
|
||||
float fac=1.0/30.0;
|
||||
for(int i=0; i<6192; i++) {
|
||||
x=datcom_.d2[k-6192+i];
|
||||
x=fac*datcom_.d2[k-6192+i];
|
||||
sq += x*x;
|
||||
}
|
||||
px = 10.0*log10(sq/6192.0) + 70.0; // Why +70 ???
|
||||
sqave=0.5*(sq+sq0);
|
||||
sq0=sq;
|
||||
// qDebug() << "rms:" << sqrt(sq/6192.0);
|
||||
px = 10.0*log10(sqave/6192.0);
|
||||
if(px>60.0) px=60.0;
|
||||
if(px<0.0) px=0.0;
|
||||
QString t;
|
||||
@ -466,8 +472,12 @@ void MainWindow::dataSink(int k)
|
||||
if(m_saveAll) {
|
||||
QDateTime t = QDateTime::currentDateTimeUtc();
|
||||
m_dateTime=t.toString("yyyy-MMM-dd hh:mm");
|
||||
QString fname=m_saveDir + "/" + t.date().toString("yyMMdd") + "_" +
|
||||
t.time().toString("hhmm") + ".wav";
|
||||
QString fname=m_saveDir + "/" + m_hisCall + "_" +
|
||||
t.date().toString("yyMMdd") + "_" +
|
||||
t.time().toString("hhmmss") + ".wav";
|
||||
int i0=fname.indexOf(".wav");
|
||||
if(fname.mid(i0-2,2)=="29") fname=fname.mid(0,i0-2)+"00.wav";
|
||||
if(fname.mid(i0-2,2)=="59") fname=fname.mid(0,i0-2)+"30.wav";
|
||||
*future2 = QtConcurrent::run(savewav, fname);
|
||||
watcher2->setFuture(*future2);
|
||||
}
|
||||
@ -616,13 +626,13 @@ void MainWindow::keyPressEvent( QKeyEvent *e ) //keyPressEvent
|
||||
break;
|
||||
case Qt::Key_G:
|
||||
if(e->modifiers() & Qt::AltModifier) {
|
||||
genStdMsgs("");
|
||||
genStdMsgs("-26");
|
||||
break;
|
||||
}
|
||||
case Qt::Key_L:
|
||||
if(e->modifiers() & Qt::ControlModifier) {
|
||||
lookup();
|
||||
genStdMsgs("");
|
||||
genStdMsgs("-26");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -852,7 +862,7 @@ void MainWindow::diskWriteFinished() //diskWriteFinished
|
||||
{
|
||||
// qDebug() << "diskWriteFinished";
|
||||
}
|
||||
//Delete ../save/*.tf2
|
||||
//Delete ../save/*.wav
|
||||
void MainWindow::on_actionDelete_all_wav_files_in_SaveDir_triggered()
|
||||
{
|
||||
int i;
|
||||
@ -868,7 +878,7 @@ void MainWindow::on_actionDelete_all_wav_files_in_SaveDir_triggered()
|
||||
for(f=files.begin(); f!=files.end(); ++f) {
|
||||
fname=*f;
|
||||
i=(fname.indexOf(".wav"));
|
||||
if(i==11) dir.remove(fname);
|
||||
if(i>10) dir.remove(fname);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1399,6 +1409,7 @@ void MainWindow::doubleClickOnCall(QString hiscall, bool ctrl)
|
||||
QString rpt="";
|
||||
if(ctrl) rpt=t2.mid(23,3);
|
||||
lookup();
|
||||
rpt="-26";
|
||||
genStdMsgs(rpt);
|
||||
if(t2.indexOf(m_myCall)>0) {
|
||||
m_ntx=2;
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>616</width>
|
||||
<height>477</height>
|
||||
<height>460</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@ -244,7 +244,7 @@ p, li { white-space: pre-wrap; }
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QwtThermo" name="xThermo">
|
||||
<widget class="QwtThermo" name="xThermo" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
@ -257,19 +257,19 @@ p, li { white-space: pre-wrap; }
|
||||
<height>180</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="borderWidth">
|
||||
<property name="borderWidth" stdset="0">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maxValue">
|
||||
<property name="maxValue" stdset="0">
|
||||
<double>60.000000000000000</double>
|
||||
</property>
|
||||
<property name="minValue">
|
||||
<property name="minValue" stdset="0">
|
||||
<double>0.000000000000000</double>
|
||||
</property>
|
||||
<property name="pipeWidth">
|
||||
<property name="pipeWidth" stdset="0">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<property name="value" stdset="0">
|
||||
<double>0.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
@ -530,19 +530,6 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="setTxFreqButton">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Set Tx Freq</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
@ -559,44 +546,6 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="NBcheckBox">
|
||||
<property name="text">
|
||||
<string>NB</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSlider" name="NBslider">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>40</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
|
Loading…
Reference in New Issue
Block a user