当前位置:网站首页>Add custom fields to the time synchronization message based on uavcan protocol in Px4 code learning
Add custom fields to the time synchronization message based on uavcan protocol in Px4 code learning
2022-06-22 11:37:00 【Childe_ plume】
One 、 Specific operation
stay /src/drivers/uavcan/libuavcan/dsdl/uavcan/protocol/4.GlobalTimeSync.uavcan Add custom variables to the file , To compile to msg In the message body .
Pictured (1) Shown ,transmission_type This is the added custom field . The data type can be uint56, It can also be for uint16.

(1)
Fields added in the above file , Will pass dsdl compiler , Automatic generation src/drivers/uavcan/libuavcan/libuavcan/include/dsdlc_generated/uavcan/protocol/GlobalTimeSync.hpp Contents of the file . Pictured (2) Shown .

(2)
Two 、 The experimental steps
You can generate the above files through msg Send custom fields . Pictured (3) For example , stay src/drivers/uavcan/libuavcan/libuavcan/include/uavcan/protocol/global_time_sync_master.hpp In file , send out 666 Test data .

(3)
stay src/drivers/uavcan/libuavcan/libuavcan/include/uavcan/protocol/global_time_sync_slave.hpp Receive data from file . Pictured (4) Shown .

(4)
stay src/drivers/uavcan/uavcan_main.cpp In file , With orb Send data in the form of message . Pictured (5) Shown .

(5)
By running src/examples/px4_simple_app/px4_simple_app.c Program , Will receive orb Print out the message .

(6)
3、 ... and 、 experimental result
Two flight controllers pass can Bus connection , Download the same code , All received 666 The news of . Pictured (7) Shown .

边栏推荐
- jg_ Using easyexcel to read Excel_ twenty million two hundred and twenty thousand six hundred and nineteen
- Microsoft edge browser dev 104 is released, and the deep / shallow theme switching is smoother
- APM flight mode switching -- source code explanation
- 奋斗吧,程序员——第四十六章 此情可待成追忆,只是当时已惘然
- 2022年度敏捷教练行业现状报告(2022 State of Agile Coaching Report)
- Leetcode algorithm refers to offer 24 Reverse linked list
- Eureka的InstanceInfoReplicator类(服务注册辅助工具)
- CF edu118F 题解
- Electron adding SQLite database
- 奋斗吧,程序员——第五十章 海内存知己,天涯若比邻
猜你喜欢

Convert the colored liquid image into transparent liquid, and CMU teaches the robot to accurately control how much water is poured into the cup

TCP connection establishment process (in-depth understanding of the source code and three handshakes)

开源代码存在安全隐患:一个项目平均有49个漏洞

Web Configuration of Visual Studio Code

PHP database mysql question

Go microservice (I) - getting started with RPC

Basic principles of the Internet

【软工】获取需求

Go微服务(一)——RPC入门

二叉树的前序、中序、后序遍历的两种实现
随机推荐
jg_ Using easyexcel to read Excel_ twenty million two hundred and twenty thousand six hundred and nineteen
Interpretation of basic requirements for classified protection of network security (GBT 22239-2019)
本周四晚19:00战码先锋第7期直播丨三方应用开发者如何为开源做贡献
如果你是个半路出家的程序员,请一字一句的看完
SQLMap-hh
[Software Engineering] Introduction & process and life cycle modeling
R语言epiDisplay包的idr.display函数获取泊松回归poisson模型的汇总统计信息(初始事件密度比IDR值、调整事件密度比IDR值及其置信区间、Wald检验的p值和似然比检验的p值)
R语言使用自定义函数编写深度学习阶跃step激活函数、并可视化阶跃step激活函数
Leetcode algorithm refers to offer 24 Reverse linked list
[user case - intelligent manufacturing] Digital generous "cloud" collaboration, leap over Qianshan "guarantee" production!
【软工】计划和项目管理
TCP connection establishment process (in-depth understanding of the source code and three handshakes)
Certificate issuance process on aliyun OS (certbot)
2022年遵义市土地基准地价矢量数据(WGS84)
Pychart debugging is stuck and connected appears
Call center CTI system
牛客挑战赛53E题解 & 带花树学习笔记
The R language dplyr package mutate function divides two numeric variables in the dataframe to create a new data column (create a new variable)
Daily question 5-1636 Sort arrays in ascending order by frequency
奋斗吧,程序员——第三十九章 人生不失意,焉能慕知己