mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-09-28 16:16:48 -04:00
Add "Clear reference spectrum" to the File menu.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7426 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
a45a4d710b
commit
d2fb561f10
@ -1,4 +1,4 @@
|
|||||||
subroutine refspectrum(id2,brefspec,buseref,fname)
|
subroutine refspectrum(id2,bclear,brefspec,buseref,fname)
|
||||||
|
|
||||||
! Input:
|
! Input:
|
||||||
! id2 i*2 Raw 16-bit integer data, 12000 Hz sample rate
|
! id2 i*2 Raw 16-bit integer data, 12000 Hz sample rate
|
||||||
@ -6,7 +6,7 @@ subroutine refspectrum(id2,brefspec,buseref,fname)
|
|||||||
|
|
||||||
parameter (NFFT=6912,NH=NFFT/2)
|
parameter (NFFT=6912,NH=NFFT/2)
|
||||||
integer*2 id2(NFFT)
|
integer*2 id2(NFFT)
|
||||||
logical*1 brefspec,buseref
|
logical*1 bclear,brefspec,buseref
|
||||||
|
|
||||||
real x0(0:NH-1) !Input samples
|
real x0(0:NH-1) !Input samples
|
||||||
real x1(0:NH-1) !Output samples (delayed by one block)
|
real x1(0:NH-1) !Output samples (delayed by one block)
|
||||||
@ -37,6 +37,7 @@ subroutine refspectrum(id2,brefspec,buseref,fname)
|
|||||||
x1s=0.
|
x1s=0.
|
||||||
first=.false.
|
first=.false.
|
||||||
endif
|
endif
|
||||||
|
if(bclear) s=0.
|
||||||
|
|
||||||
if(brefspec) then
|
if(brefspec) then
|
||||||
x(0:NH-1)=0.001*id2(1:NH)
|
x(0:NH-1)=0.001*id2(1:NH)
|
||||||
@ -96,7 +97,6 @@ subroutine refspectrum(id2,brefspec,buseref,fname)
|
|||||||
if(s(i).gt.0.0) filter(i)=20.0*log10(fil(i))
|
if(s(i).gt.0.0) filter(i)=20.0*log10(fil(i))
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
! open(16,file='refspec.dat',status='unknown')
|
|
||||||
open(16,file=fname,status='unknown')
|
open(16,file=fname,status='unknown')
|
||||||
do i=1,NH
|
do i=1,NH
|
||||||
freq=i*df
|
freq=i*df
|
||||||
@ -111,7 +111,6 @@ subroutine refspectrum(id2,brefspec,buseref,fname)
|
|||||||
|
|
||||||
if(buseref) then
|
if(buseref) then
|
||||||
if(firstuse) then
|
if(firstuse) then
|
||||||
! open(16,file='refspec.dat',status='unknown')
|
|
||||||
fil=1.0
|
fil=1.0
|
||||||
open(16,file=fname,status='old',err=10)
|
open(16,file=fname,status='old',err=10)
|
||||||
do i=1,NH
|
do i=1,NH
|
||||||
|
@ -113,8 +113,8 @@ extern "C" {
|
|||||||
int len1, int len2, int len3);
|
int len1, int len2, int len3);
|
||||||
void degrade_snr_(short d2[], int* n, float* db, float* bandwidth);
|
void degrade_snr_(short d2[], int* n, float* db, float* bandwidth);
|
||||||
void wav12_(short d2[], short d1[], int* nbytes, short* nbitsam2);
|
void wav12_(short d2[], short d1[], int* nbytes, short* nbitsam2);
|
||||||
void refspectrum_(short int d2[], bool* brefspec, bool* buseref,
|
void refspectrum_(short int d2[], bool* bclearrefspec, bool* brefspec,
|
||||||
const char* c_fname, int len);
|
bool* buseref, const char* c_fname, int len);
|
||||||
}
|
}
|
||||||
|
|
||||||
int volatile itone[NUM_ISCAT_SYMBOLS]; //Audio tones for all Tx symbols
|
int volatile itone[NUM_ISCAT_SYMBOLS]; //Audio tones for all Tx symbols
|
||||||
@ -248,6 +248,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
|||||||
m_bFastDecodeCalled {false},
|
m_bFastDecodeCalled {false},
|
||||||
m_bDoubleClickAfterCQnnn {false},
|
m_bDoubleClickAfterCQnnn {false},
|
||||||
m_bRefSpec {false},
|
m_bRefSpec {false},
|
||||||
|
m_bClearRefSpec {false},
|
||||||
m_ihsym {0},
|
m_ihsym {0},
|
||||||
m_nzap {0},
|
m_nzap {0},
|
||||||
m_px {0.0},
|
m_px {0.0},
|
||||||
@ -1091,7 +1092,9 @@ void MainWindow::dataSink(qint64 frames)
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_bUseRef=m_wideGraph->useRef();
|
m_bUseRef=m_wideGraph->useRef();
|
||||||
refspectrum_(&dec_data.d2[k-m_nsps/2],&m_bRefSpec,&m_bUseRef,c_fname,len);
|
refspectrum_(&dec_data.d2[k-m_nsps/2],&m_bClearRefSpec,&m_bRefSpec,
|
||||||
|
&m_bUseRef,c_fname,len);
|
||||||
|
m_bClearRefSpec=false;
|
||||||
|
|
||||||
// Get power, spectrum, and ihsym
|
// Get power, spectrum, and ihsym
|
||||||
int trmin=m_TRperiod/60;
|
int trmin=m_TRperiod/60;
|
||||||
@ -5874,6 +5877,11 @@ void MainWindow::on_actionSave_reference_spectrum_triggered()
|
|||||||
m_bRefSpec=true;
|
m_bRefSpec=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionClear_reference_spectrum_triggered()
|
||||||
|
{
|
||||||
|
m_bClearRefSpec=true;
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::on_sbCQTxFreq_valueChanged(int)
|
void MainWindow::on_sbCQTxFreq_valueChanged(int)
|
||||||
{
|
{
|
||||||
setXIT (ui->TxFreqSpinBox->value ());
|
setXIT (ui->TxFreqSpinBox->value ());
|
||||||
|
@ -241,6 +241,7 @@ private slots:
|
|||||||
void on_actionFast_Graph_triggered();
|
void on_actionFast_Graph_triggered();
|
||||||
void fast_decode_done();
|
void fast_decode_done();
|
||||||
void on_actionSave_reference_spectrum_triggered();
|
void on_actionSave_reference_spectrum_triggered();
|
||||||
|
void on_actionClear_reference_spectrum_triggered();
|
||||||
void on_sbTR_valueChanged(int index);
|
void on_sbTR_valueChanged(int index);
|
||||||
void on_sbFtol_valueChanged(int index);
|
void on_sbFtol_valueChanged(int index);
|
||||||
void on_cbFast9_clicked(bool b);
|
void on_cbFast9_clicked(bool b);
|
||||||
@ -414,6 +415,7 @@ private:
|
|||||||
bool m_bFastDecodeCalled;
|
bool m_bFastDecodeCalled;
|
||||||
bool m_bDoubleClickAfterCQnnn;
|
bool m_bDoubleClickAfterCQnnn;
|
||||||
bool m_bRefSpec;
|
bool m_bRefSpec;
|
||||||
|
bool m_bClearRefSpec;
|
||||||
bool m_bUseRef;
|
bool m_bUseRef;
|
||||||
bool m_bFastDone;
|
bool m_bFastDone;
|
||||||
bool m_bAltV;
|
bool m_bAltV;
|
||||||
|
@ -2337,6 +2337,7 @@ QPushButton[state="ok"] {
|
|||||||
<addaction name="actionDecode_remaining_files_in_directory"/>
|
<addaction name="actionDecode_remaining_files_in_directory"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionSave_reference_spectrum"/>
|
<addaction name="actionSave_reference_spectrum"/>
|
||||||
|
<addaction name="actionClear_reference_spectrum"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionDelete_all_wav_files_in_SaveDir"/>
|
<addaction name="actionDelete_all_wav_files_in_SaveDir"/>
|
||||||
<addaction name="actionErase_ALL_TXT"/>
|
<addaction name="actionErase_ALL_TXT"/>
|
||||||
@ -2893,6 +2894,11 @@ QPushButton[state="ok"] {
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionClear_reference_spectrum">
|
||||||
|
<property name="text">
|
||||||
|
<string>Clear reference spectrum</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
Loading…
Reference in New Issue
Block a user