【MAVLink】XML协议生成C++接口
1、下载源码
1)下载 mavlink 源码及子模块
git clone --depth=1 https://github.com/mavlink/mavlink.git --recursive
参数:
- –depth=1 只克隆仓库的最新一次提交
- –recursive:下载子模块代码
2)安装 pymavlink
python3 -m pip install -r pymavlink/requirements.txt
3)修改源码
修改 mavgenerate.py 去掉 error_limit=error_limit
#opts = mavgen.Opts(self.out_value.get(), wire_protocol=self.protocol_value.get(), language=self.language_value.get(), validate=self.validate_value.get(), error_limit=error_limit, strict_units=self.strict_units_value.get())
opts = mavgen.Opts(self.out_value.get(), wire_protocol=self.protocol_value.get(), language=self.language_value.get(), validate=self.validate_value.get(), strict