35 lines
904 B
C
35 lines
904 B
C
|
|
#ifndef GDUDRONECMDROLVER_H
|
||
|
|
#define GDUDRONECMDROLVER_H
|
||
|
|
|
||
|
|
#include <QObject>
|
||
|
|
|
||
|
|
#include "GDUModule/glink/glink_m/glink_m.h"
|
||
|
|
#include "GDUModule/glink/glink_np/glink_np.h"
|
||
|
|
#include "GDUModule/protocol/gduapiparse.h"
|
||
|
|
|
||
|
|
class GDUDroneManager;
|
||
|
|
|
||
|
|
class GDUDroneCmdRolver : public QObject
|
||
|
|
{
|
||
|
|
Q_OBJECT
|
||
|
|
public:
|
||
|
|
explicit GDUDroneCmdRolver(GDUDroneManager *gduDroneManager);
|
||
|
|
~GDUDroneCmdRolver();
|
||
|
|
GDUApiParse *gduAPIParse = nullptr;
|
||
|
|
signals:
|
||
|
|
|
||
|
|
public slots:
|
||
|
|
//接收数据包
|
||
|
|
void didGotCmdData(QByteArray data);
|
||
|
|
|
||
|
|
private:
|
||
|
|
GlinkMessage_t* glink_ReadEmptyMsg = nullptr; //收到的数据,默认payload长度是255
|
||
|
|
GlinkStatus_t glinkReadStatus = {0}; //收到数据时的状态
|
||
|
|
GDUDroneManager *_gduDroneManager = nullptr;
|
||
|
|
private:
|
||
|
|
void _printMsgInfo(GlinkMessage_t *msg);
|
||
|
|
void _printBody(GlinkMessage_t *msg,QByteArray arr);
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif // GDUDRONECMDROLVER_H
|