mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-15 08:31:57 -05:00
Better handling of calls to ft4_decode(), depending on ring-buffer pointer.
This commit is contained in:
parent
7e3b153d8b
commit
e11acde9fb
@ -8609,10 +8609,13 @@ void MainWindow::write_all(QString txRx, QString message)
|
|||||||
void MainWindow::ft4Data(int k)
|
void MainWindow::ft4Data(int k)
|
||||||
{
|
{
|
||||||
static int nhsec0=-1;
|
static int nhsec0=-1;
|
||||||
|
static bool wrapped=false;
|
||||||
short id[60000];
|
short id[60000];
|
||||||
|
|
||||||
int nhsec=k/6000;
|
int nhsec=k/6000;
|
||||||
|
if(nhsec0>nhsec) nhsec0=-1;
|
||||||
if(nhsec==nhsec0) return;
|
if(nhsec==nhsec0) return;
|
||||||
|
if(k<60000 and !wrapped) return;
|
||||||
|
|
||||||
//Process FT4 data at 0.5 s intervals
|
//Process FT4 data at 0.5 s intervals
|
||||||
int j=k/6000;
|
int j=k/6000;
|
||||||
@ -8621,8 +8624,12 @@ void MainWindow::ft4Data(int k)
|
|||||||
for(int i=0; i<60000; i++) {
|
for(int i=0; i<60000; i++) {
|
||||||
id[i]=dec_data.d2[j];
|
id[i]=dec_data.d2[j];
|
||||||
j++;
|
j++;
|
||||||
if(j>=NRING) j=j-NRING;
|
if(j>=NRING) {
|
||||||
|
j=j-NRING;
|
||||||
|
wrapped=true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if(j>60000) wrapped=false;
|
||||||
|
|
||||||
if(k>=NRING) {
|
if(k>=NRING) {
|
||||||
if(m_saveAll) save_FT4();
|
if(m_saveAll) save_FT4();
|
||||||
|
Loading…
Reference in New Issue
Block a user