Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
不卤废丝
taskbus
提交
00ebd0a5
taskbus
项目概览
不卤废丝
/
taskbus
与 Fork 源项目一致
Fork自
colorEagleStdio / taskbus
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
taskbus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
00ebd0a5
编写于
4月 28, 2022
作者:
M
manjaro-xfce
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
添加基于stdio的调配解调、ADS-B接收模块
上级
3ea0525e
变更
9
展开全部
隐藏空白更改
内联
并排
Showing
9 changed file
with
1783 addition
and
18 deletion
+1783
-18
module_templates/stdio/README.txt
module_templates/stdio/README.txt
+1
-0
module_templates/stdio/fmdem/build.sh
module_templates/stdio/fmdem/build.sh
+2
-0
module_templates/stdio/fmdem/fmdem
module_templates/stdio/fmdem/fmdem
+0
-0
module_templates/stdio/fmdem/fmdem.cpp
module_templates/stdio/fmdem/fmdem.cpp
+50
-0
module_templates/stdio/recv_adsb/build.sh
module_templates/stdio/recv_adsb/build.sh
+2
-0
module_templates/stdio/recv_adsb/recv_adsb
module_templates/stdio/recv_adsb/recv_adsb
+0
-0
module_templates/stdio/recv_adsb/recv_adsb.c
module_templates/stdio/recv_adsb/recv_adsb.c
+1728
-0
module_templates/stdio/recv_adsb/recv_adsb.exe
module_templates/stdio/recv_adsb/recv_adsb.exe
+0
-0
modules/warppers/warpper_stdio/dlgwrpstdio.cpp
modules/warppers/warpper_stdio/dlgwrpstdio.cpp
+0
-18
未找到文件。
module_templates/stdio/README.txt
0 → 100644
浏览文件 @
00ebd0a5
这里的项目是基于STDIO的项目,运行时要用 warpper_stdio进行包装,立刻接入平台。
\ No newline at end of file
module_templates/stdio/fmdem/build.sh
0 → 100644
浏览文件 @
00ebd0a5
#!/bin/bash
g++
-static
-static-libstdc
++ fmdem.cpp
-o
fmdem
module_templates/stdio/fmdem/fmdem
0 → 100755
浏览文件 @
00ebd0a5
文件已添加
module_templates/stdio/fmdem/fmdem.cpp
0 → 100755
浏览文件 @
00ebd0a5
#include <cstdio>
#include <cmath>
#ifdef WIN32
#include <io.h>
#include <fcntl.h>
#endif
#define Pi 3.14159265354
double
angle
(
int
x
,
int
y
)
{
double
angle
=
0
;
if
(
x
==
0
)
angle
=
(
y
>
0
)
?
Pi
/
2
:-
Pi
/
2
;
else
if
(
x
>
0
)
angle
=
atan
(
y
*
1.0
/
x
);
else
if
(
y
>=
0
)
angle
=
atan
(
y
*
1.0
/
x
)
+
Pi
;
else
angle
=
atan
(
y
*
1.0
/
x
)
-
Pi
;
return
angle
;
}
int
main
()
{
#ifdef WIN32
setmode
(
fileno
(
stdout
),
O_BINARY
);
setmode
(
fileno
(
stdin
),
O_BINARY
);
#endif
short
buf
[
128
][
2
];
short
out
[
128
];
int
nPts
=
0
;
int
last_i
=
0
,
last_q
=
0
;
while
((
nPts
=
fread
(
buf
,
4
,
128
,
stdin
)))
{
for
(
int
j
=
0
;
j
<
nPts
;
++
j
)
{
//d(phase)/d(t) = freq
int
curr_i
=
buf
[
j
][
0
];
int
curr_q
=
buf
[
j
][
1
];
int
diff_i
=
last_i
*
curr_i
+
last_q
*
curr_q
;
int
diff_q
=
last_q
*
curr_i
-
last_i
*
curr_q
;
last_i
=
curr_i
;
last_q
=
curr_q
;
out
[
j
]
=
angle
(
diff_i
,
diff_q
)
/
Pi
*
4096
;
}
fwrite
(
out
,
2
,
nPts
,
stdout
);
fflush
(
stdout
);
}
return
0
;
}
module_templates/stdio/recv_adsb/build.sh
0 → 100644
浏览文件 @
00ebd0a5
#!/bin/bash
gcc
-static
recv_adsb.c
-o
recv_adsb
-lm
module_templates/stdio/recv_adsb/recv_adsb
0 → 100755
浏览文件 @
00ebd0a5
文件已添加
module_templates/stdio/recv_adsb/recv_adsb.c
0 → 100644
浏览文件 @
00ebd0a5
此差异已折叠。
点击以展开。
module_templates/stdio/recv_adsb/recv_adsb.exe
0 → 100644
浏览文件 @
00ebd0a5
文件已添加
modules/warppers/warpper_stdio/dlgwrpstdio.cpp
浏览文件 @
00ebd0a5
...
...
@@ -165,24 +165,6 @@ bool DlgWrpStdio::cmd_stop()
{
if
(
m_process
->
state
()
!=
QProcess
::
Running
)
return
false
;
//发送信令,终止
char
cmd
[]
=
"function=quit;{ret = 0}"
;
subject_package_header
header
;
header
.
prefix
[
0
]
=
0x3C
;
header
.
prefix
[
1
]
=
0x5A
;
header
.
prefix
[
2
]
=
0x7E
;
header
.
prefix
[
3
]
=
0x69
;
header
.
data_length
=
static_cast
<
unsigned
int
>
(
strlen
(
cmd
)
+
1
);
header
.
path_id
=
1
;
header
.
subject_id
=
control_subect_id
();
m_process
->
write
((
char
*
)
&
header
,
sizeof
(
subject_package_header
));
m_process
->
write
(
cmd
,
strlen
(
cmd
)
+
1
);
int
c
=
0
;
while
(
++
c
<
100
&&
m_process
->
state
()
==
QProcess
::
Running
)
{
m_process
->
waitForFinished
(
20
);
QCoreApplication
::
processEvents
(
QEventLoop
::
ExcludeUserInputEvents
);
}
m_process
->
kill
();
return
true
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录