将mqtt和小田代码单独放到commer.cpp里面,主程序调用 仅融合,代码未完善 # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动
21 lines
702 B
C
21 lines
702 B
C
#ifndef COMMSER_H
|
|
#define COMMSER_H
|
|
|
|
#include "Arduino.h"
|
|
#include <Ticker.h> //调用Ticker.h库
|
|
#include "FoodDeliveryBase.h"
|
|
#include "config.h"
|
|
|
|
void mqtt_receiveCallback(char* topic, byte* payload, unsigned int length);
|
|
void mavThread();
|
|
void pubThread();
|
|
void flashThread() ;
|
|
void writeRoute(String topicStr);
|
|
void mavlink_receiveCallback(uint8_t c) ;
|
|
extern String topicPub[];
|
|
extern int topicPubCount;
|
|
extern FoodCube fc; //创建项目对象
|
|
extern Ticker pubTicker; //定时发布主题 线程
|
|
extern Ticker mavTicker; //定时 指定飞控mavlink 串口返回的数据类别 防止飞控启动滞后
|
|
extern Ticker flashTicker; //单片机主动 按钮主动发布主题 线程
|
|
#endif |