Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

图表部分,能不能来一个简单的协议? #97

Closed
HonestQiao opened this issue Apr 21, 2023 · 3 comments
Closed

图表部分,能不能来一个简单的协议? #97

HonestQiao opened this issue Apr 21, 2023 · 3 comments

Comments

@HonestQiao
Copy link

HonestQiao commented Apr 21, 2023

例如,串口输出的就是下面的数据:

1.20
1.23
1.25
1.30
1.50

输出一个,换行一个,然后根据接收时间,画出来即可。
每行可能有1个,也有可能使用空格或者,分割的多个。

@Neutree
Copy link
Owner

Neutree commented Apr 21, 2023

最好是使用现在的协议这样的有完整协议的比较完整,而且也提供了c代码呀

你说的这种也可以,调试简单,欢迎讨论实现方式和 提交PR

@HonestQiao
Copy link
Author

最好是使用现在的协议这样的有完整协议的比较完整,而且也提供了c代码呀

你说的这种也可以,调试简单,欢迎讨论实现方式和 提交PR

OK,我会找时间试一下添加一个这样的图像控件插件。

@Neutree
Copy link
Owner

Neutree commented Nov 15, 2023

今天增加了一个纯字符串协议
格式: $[line name],[x],[y]<checksum>\n
"$" 代表帧头, "\n"代表帧尾, "," 作为分隔符号。
checksum (和校验)可选, checksum 就是除了 ",checksum" 之外的字符和对256取余。
比如:
"$roll,1.0,2.0\n"
"$pitch,1.0,2.0\r\n"
"$pitch,1.0,2.0,179\n" (179 = sum(b"$pitch,1.0,2.0") % 256)

软件帮助信息里面封装好了的 C 代码和 python 代码

@Neutree Neutree closed this as completed Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants