2024-07-01 22:40:12 +08:00
|
|
|
#ifndef COMMSER_H
|
|
|
|
#define COMMSER_H
|
|
|
|
|
|
|
|
#include "Arduino.h"
|
|
|
|
#include <Ticker.h> //调用Ticker.h库
|
|
|
|
#include "FoodDeliveryBase.h"
|
|
|
|
#include "config.h"
|
|
|
|
|
2024-07-02 18:24:51 +08:00
|
|
|
void mqtt_receiveCallback(char *topic, byte *payload, unsigned int length);
|
2024-07-01 22:40:12 +08:00
|
|
|
void mavThread();
|
|
|
|
void pubThread();
|
2024-07-02 18:24:51 +08:00
|
|
|
void flashThread();
|
2024-07-01 22:40:12 +08:00
|
|
|
void writeRoute(String topicStr);
|
2024-07-02 18:24:51 +08:00
|
|
|
void mavlink_receiveCallback(uint8_t c);
|
2024-07-01 22:40:12 +08:00
|
|
|
extern String topicPub[];
|
|
|
|
extern int topicPubCount;
|
2024-07-02 18:24:51 +08:00
|
|
|
extern FoodCube fc; // 创建项目对象
|
|
|
|
extern Ticker pubTicker; // 定时发布主题 线程
|
|
|
|
extern Ticker mavTicker; // 定时 指定飞控mavlink 串口返回的数据类别 防止飞控启动滞后
|
|
|
|
extern Ticker flashTicker; // 单片机主动 按钮主动发布主题 线程
|
2024-07-01 22:40:12 +08:00
|
|
|
#endif
|