提交 a70421f6 编写于 作者: D dev

Watch stdout and stderr output

上级 c300b65a
......@@ -78,7 +78,7 @@ void specWidget::slot_newDemodFreq(qint64 freq, qint64 delta)/* delta is the off
void specWidget::slot_msg(QByteArray s, bool bStdErr)
{
ui->plainTextEdit_msg->appendPlainText(s);
ui->plainTextEdit_msg->appendPlainText(QString::fromUtf8(s));
}
void specWidget::setNewFftData(const double * rfftData, int size)
......@@ -377,6 +377,8 @@ void specWidget::resetFFT()
if (m_nTimerID>=0)
killTimer(m_nTimerID);
freeFFT();
int pg = ui->toolBox_tool->currentIndex();
ui->toolBox_tool->setCurrentIndex(2);
if (usrp)
{
close_device();
......@@ -393,8 +395,6 @@ void specWidget::resetFFT()
int updateIntelv = 1000.0 /ui->spinBox_fftUpdate->value() + .5;
m_channel = ui->spinBox_chan->value();
//watcher->m_bStop = false;
//watcher->start(QThread::HighPriority);
if (!usrp)
{
open_device();
......@@ -402,7 +402,6 @@ void specWidget::resetFFT()
if (!usrp)
{
//watcher->stop_and_wait();
return;
}
......@@ -467,8 +466,7 @@ void specWidget::resetFFT()
if (fOut.isOpen())
fOut.close();
});
//End watch
//watcher->stop_and_wait();
ui->toolBox_tool->setCurrentIndex(pg);
m_runth->start();
m_saveth->start();
m_nTimerID = startTimer(updateIntelv);
......@@ -559,12 +557,6 @@ void specWidget::timerEvent(QTimerEvent * e)
}
void specWidget::on_doubleSpinBox_center_2_valueChanged(double arg1)
{
m_dManuAdd = arg1;
}
void specWidget::on_comboBox_fftSize_activated(int index)
{
if (index)
......@@ -573,7 +565,8 @@ void specWidget::on_comboBox_fftSize_activated(int index)
m_nFFTSize = 65536;
if (m_nFFTSize<128)
m_nFFTSize = 128;
resetFFT();
if (usrp)
resetFFT();
saveSettings();
}
......
......@@ -94,7 +94,6 @@ public:
bool saveWaterfall(const QString & filename);
private slots:
void on_pushButton_reset_clicked();
void on_doubleSpinBox_center_2_valueChanged(double arg1);
void on_comboBox_fftSize_activated(int index);
void on_doubleSpinBox_center_valueChanged(double arg1);
void on_spinBox_gain_valueChanged(int arg1);
......
......@@ -43,10 +43,10 @@ void stdout_watcher::run()
dup2(stdout_bk, fileno(stda));//restore
};
std::thread t1(pt, stderr,true);
//std::thread t2(pt, stdout,false);
std::thread t2(pt, stdout,false);
t1.join();
//t2.join();
t2.join();
}
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册