Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Zlb_Rose
qtcpp_demo
提交
a70421f6
qtcpp_demo
项目概览
Zlb_Rose
/
qtcpp_demo
与 Fork 源项目一致
Fork自
colorEagleStdio / qtcpp_demo
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
qtcpp_demo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
a70421f6
编写于
1月 22, 2021
作者:
D
dev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Watch stdout and stderr output
上级
c300b65a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
16 deletion
+8
-16
uhd_cpp/uhd_spectrum/specwidget.cpp
uhd_cpp/uhd_spectrum/specwidget.cpp
+6
-13
uhd_cpp/uhd_spectrum/specwidget.h
uhd_cpp/uhd_spectrum/specwidget.h
+0
-1
uhd_cpp/uhd_spectrum/stdout_watcher.cpp
uhd_cpp/uhd_spectrum/stdout_watcher.cpp
+2
-2
未找到文件。
uhd_cpp/uhd_spectrum/specwidget.cpp
浏览文件 @
a70421f6
...
...
@@ -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
();
}
...
...
uhd_cpp/uhd_spectrum/specwidget.h
浏览文件 @
a70421f6
...
...
@@ -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
);
...
...
uhd_cpp/uhd_spectrum/stdout_watcher.cpp
浏览文件 @
a70421f6
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录