Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sfewfsaf
qtcpp_demo
提交
fb12c783
qtcpp_demo
项目概览
sfewfsaf
/
qtcpp_demo
与 Fork 源项目一致
Fork自
colorEagleStdio / qtcpp_demo
通知
3
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 搜索 >>
提交
fb12c783
编写于
1月 30, 2021
作者:
D
dev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Place LO offset to sprate /2
上级
2abbdfb1
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
11 addition
and
5 deletion
+11
-5
uhd_cpp/uhd_spectrum/qtgui/freqctrl.cpp
uhd_cpp/uhd_spectrum/qtgui/freqctrl.cpp
+1
-1
uhd_cpp/uhd_spectrum/specwidget.cpp
uhd_cpp/uhd_spectrum/specwidget.cpp
+2
-0
uhd_cpp/uhd_spectrum/uhd_device.cpp
uhd_cpp/uhd_spectrum/uhd_device.cpp
+2
-1
uhd_cpp/uhd_spectrum/uhd_device_win32.cpp
uhd_cpp/uhd_spectrum/uhd_device_win32.cpp
+6
-3
未找到文件。
uhd_cpp/uhd_spectrum/qtgui/freqctrl.cpp
浏览文件 @
fb12c783
...
@@ -58,7 +58,7 @@ CFreqCtrl::CFreqCtrl(QWidget *parent) :
...
@@ -58,7 +58,7 @@ CFreqCtrl::CFreqCtrl(QWidget *parent) :
m_DigitColor
=
QColor
(
0xFF
,
0xFF
,
0xFF
,
0xFF
);
m_DigitColor
=
QColor
(
0xFF
,
0xFF
,
0xFF
,
0xFF
);
m_HighlightColor
=
QColor
(
0x5A
,
0x5A
,
0x5A
,
0xFF
);
m_HighlightColor
=
QColor
(
0x5A
,
0x5A
,
0x5A
,
0xFF
);
m_UnitsColor
=
Qt
::
gray
;
m_UnitsColor
=
Qt
::
gray
;
m_freq
=
146123456
;
m_freq
=
0
;
setup
(
0
,
1
,
6000000000U
,
1
,
FCTL_UNIT_NONE
);
setup
(
0
,
1
,
6000000000U
,
1
,
FCTL_UNIT_NONE
);
m_Oldfreq
=
0
;
m_Oldfreq
=
0
;
m_LastLeadZeroPos
=
0
;
m_LastLeadZeroPos
=
0
;
...
...
uhd_cpp/uhd_spectrum/specwidget.cpp
浏览文件 @
fb12c783
...
@@ -118,6 +118,8 @@ void specWidget::setBookmarksEnabled(bool enabled){
...
@@ -118,6 +118,8 @@ void specWidget::setBookmarksEnabled(bool enabled){
ui
->
plotter
->
setBookmarksEnabled
(
enabled
);
ui
->
plotter
->
setBookmarksEnabled
(
enabled
);
}
}
void
specWidget
::
setCenterFreq
(
quint64
f
){
void
specWidget
::
setCenterFreq
(
quint64
f
){
if
(
f
<=
0
)
return
;
f
=
set_center_freq
(
f
);
f
=
set_center_freq
(
f
);
ui
->
plotter
->
setCenterFreq
(
f
);
ui
->
plotter
->
setCenterFreq
(
f
);
if
(
ui
->
doubleSpinBox_center
->
value
()
*
1e6
!=
ui
->
freqCtrl
->
getFrequency
())
if
(
ui
->
doubleSpinBox_center
->
value
()
*
1e6
!=
ui
->
freqCtrl
->
getFrequency
())
...
...
uhd_cpp/uhd_spectrum/uhd_device.cpp
浏览文件 @
fb12c783
...
@@ -224,8 +224,9 @@ quint64 uhd_device::set_center_freq(const quint64 freq_in_hz)
...
@@ -224,8 +224,9 @@ quint64 uhd_device::set_center_freq(const quint64 freq_in_hz)
{
{
if
(
usrp
)
if
(
usrp
)
{
{
double
rate
=
usrp
->
get_rx_rate
(
m_channel
);
using
uhd
::
tune_request_t
;
using
uhd
::
tune_request_t
;
tune_request_t
tune_request_rx
=
tune_request_t
((
double
)
freq_in_hz
);
tune_request_t
tune_request_rx
=
tune_request_t
((
double
)
freq_in_hz
,
rate
/
2
);
usrp
->
set_rx_freq
(
tune_request_rx
,
m_channel
);
usrp
->
set_rx_freq
(
tune_request_rx
,
m_channel
);
return
(
quint64
)(
usrp
->
get_rx_freq
(
m_channel
));
return
(
quint64
)(
usrp
->
get_rx_freq
(
m_channel
));
}
}
...
...
uhd_cpp/uhd_spectrum/uhd_device_win32.cpp
浏览文件 @
fb12c783
...
@@ -252,6 +252,9 @@ quint64 uhd_device::set_center_freq(const quint64 freq_in_hz)
...
@@ -252,6 +252,9 @@ quint64 uhd_device::set_center_freq(const quint64 freq_in_hz)
{
{
if
(
!
usrp
)
if
(
!
usrp
)
return
freq_in_hz
;
return
freq_in_hz
;
double
srate
=
0
;
UHD_DO
(
uhd_usrp_get_rx_rate
(
usrp
,
m_channel
,
&
srate
));
fprintf
(
stderr
,
"Setting RX frequency: %f MHz...
\n
"
,
freq_in_hz
/
1e6
);
fprintf
(
stderr
,
"Setting RX frequency: %f MHz...
\n
"
,
freq_in_hz
/
1e6
);
uhd_tune_result_t
rx_tune_result
;
uhd_tune_result_t
rx_tune_result
;
uhd_tune_request_t
rx_tune_request
=
uhd_tune_request_t
rx_tune_request
=
...
@@ -259,8 +262,8 @@ quint64 uhd_device::set_center_freq(const quint64 freq_in_hz)
...
@@ -259,8 +262,8 @@ quint64 uhd_device::set_center_freq(const quint64 freq_in_hz)
/*.target_freq =*/
(
double
)
freq_in_hz
,
/*.target_freq =*/
(
double
)
freq_in_hz
,
/*.rf_freq_policy =*/
UHD_TUNE_REQUEST_POLICY_AUTO
,
/*.rf_freq_policy =*/
UHD_TUNE_REQUEST_POLICY_AUTO
,
/*.rf_freq =*/
0
,
/*.rf_freq =*/
0
,
/*.dsp_freq_policy = */
UHD_TUNE_REQUEST_POLICY_AUTO
,
/*.dsp_freq_policy = */
UHD_TUNE_REQUEST_POLICY_MANUAL
,
/*.dsp_freq =*/
0
,
/*.dsp_freq =*/
srate
/
2
,
/*.args =*/
0
/*.args =*/
0
};
};
UHD_DO
(
uhd_usrp_set_rx_freq
(
usrp
,
&
rx_tune_request
,
m_channel
,
&
rx_tune_result
));
UHD_DO
(
uhd_usrp_set_rx_freq
(
usrp
,
&
rx_tune_request
,
m_channel
,
&
rx_tune_result
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录