mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-11-03 21:40:52 -05:00 
			
		
		
		
	Don't save to a *.iq file if WSJT-X transmitted for 10 or more seconds.
This commit is contained in:
		
							parent
							
								
									88cbc521bd
								
							
						
					
					
						commit
						90b49ddc0a
					
				@ -352,7 +352,7 @@ void MainWindow::dataSink(int k)
 | 
				
			|||||||
    ndiskdat=0;
 | 
					    ndiskdat=0;
 | 
				
			||||||
    datcom_.ndiskdat=0;
 | 
					    datcom_.ndiskdat=0;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
// Get x and y power, polarized spectrum, nkhz, and ihsym
 | 
					// Get power, spectrum, nkhz, and ihsym
 | 
				
			||||||
  nb=0;
 | 
					  nb=0;
 | 
				
			||||||
  if(m_NB) nb=1;
 | 
					  if(m_NB) nb=1;
 | 
				
			||||||
  nfsample=96000;
 | 
					  nfsample=96000;
 | 
				
			||||||
@ -427,13 +427,14 @@ void MainWindow::dataSink(int k)
 | 
				
			|||||||
//    qDebug() << "aa" << "Decoder called" << ihsym << ipc_wsjtx[0] << ipc_wsjtx[1]
 | 
					//    qDebug() << "aa" << "Decoder called" << ihsym << ipc_wsjtx[0] << ipc_wsjtx[1]
 | 
				
			||||||
//             << ipc_wsjtx[2] << ipc_wsjtx[3] << ipc_wsjtx[4] ;
 | 
					//             << ipc_wsjtx[2] << ipc_wsjtx[3] << ipc_wsjtx[4] ;
 | 
				
			||||||
    decode();                                           //Start the decoder
 | 
					    decode();                                           //Start the decoder
 | 
				
			||||||
    if(m_saveAll and !m_diskData) {
 | 
					    if(m_saveAll and !m_diskData and m_nTransmitted<10) {
 | 
				
			||||||
      QString fname=m_saveDir + "/" + t.date().toString("yyMMdd") + "_" +
 | 
					      QString fname=m_saveDir + "/" + t.date().toString("yyMMdd") + "_" +
 | 
				
			||||||
          t.time().toString("hhmm");
 | 
					          t.time().toString("hhmm");
 | 
				
			||||||
      fname += ".iq";
 | 
					      fname += ".iq";
 | 
				
			||||||
      *future2 = QtConcurrent::run(savetf2, fname, false);
 | 
					      *future2 = QtConcurrent::run(savetf2, fname, false);
 | 
				
			||||||
      watcher2->setFuture(*future2);
 | 
					      watcher2->setFuture(*future2);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    m_nTransmitted=0;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  soundInThread.m_dataSinkBusy=false;
 | 
					  soundInThread.m_dataSinkBusy=false;
 | 
				
			||||||
@ -984,8 +985,17 @@ void MainWindow::guiUpdate()
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if(nsec != m_sec0) {                                     //Once per second
 | 
					  if(nsec != m_sec0) {                                     //Once per second
 | 
				
			||||||
//    qDebug() << "AAA" << nsec%60 << ipc_wsjtx[3] << ipc_wsjtx[4]<< m_monitoring;
 | 
					    static int n60z=99;
 | 
				
			||||||
//    qDebug() << "BBB" << nsec%60 << decodes_.ndecodes << m_fetched;
 | 
					    int n60=nsec%60;
 | 
				
			||||||
 | 
					    int itest[5];
 | 
				
			||||||
 | 
					    mem_q65w.lock();
 | 
				
			||||||
 | 
					    memcpy(&itest, (char*)ipc_wsjtx, 20);
 | 
				
			||||||
 | 
					    mem_q65w.unlock();
 | 
				
			||||||
 | 
					    if(itest[4]==1) m_nTransmitted++;
 | 
				
			||||||
 | 
					//    qDebug() << "AAA" << n60 << itest[0] << itest[1] << itest[2] << itest[3] << itest[4]
 | 
				
			||||||
 | 
					//             << m_nTransmitted;
 | 
				
			||||||
 | 
					    if(n60<n60z) m_nTransmitted=0;
 | 
				
			||||||
 | 
					    n60z=n60;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if(m_pctZap>30.0) {
 | 
					    if(m_pctZap>30.0) {
 | 
				
			||||||
      lab2->setStyleSheet("QLabel{background-color: #ff0000}");
 | 
					      lab2->setStyleSheet("QLabel{background-color: #ff0000}");
 | 
				
			||||||
 | 
				
			|||||||
@ -122,6 +122,7 @@ private:
 | 
				
			|||||||
  qint32  m_dB;
 | 
					  qint32  m_dB;
 | 
				
			||||||
  qint32  m_fetched=0;
 | 
					  qint32  m_fetched=0;
 | 
				
			||||||
  qint32  m_hsymStop=302;
 | 
					  qint32  m_hsymStop=302;
 | 
				
			||||||
 | 
					  qint32  m_nTransmitted=0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  double  m_fAdd;
 | 
					  double  m_fAdd;
 | 
				
			||||||
  double  m_xavg;
 | 
					  double  m_xavg;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user