#ifndef RCPROCESS_H #define RCPROCESS_H #include #include "QDebug" #include "QtEndian" #include "QDateTime" #include "sbusparser.h" #include "ThreadTemplet.h" #ifdef QtMavlinkNode #include class MAVLINKNODESHARED_EXPORT rcprocess : public ThreadTemplet { #else class rcprocess : public ThreadTemplet { #endif Q_OBJECT public: explicit rcprocess(QObject *parent = nullptr); ~rcprocess(); signals: void new_remote_ctrl(QList); public slots: //缓存对外接口 void SoftRCUpdate(QList rc); void setRCActive(uint32_t value) { isRCActive = value; qDebug() << "set ch" << isRCActive; } private slots: //线程私有接口 void process(); //缓存私有接口 void update15Hz(void); //解析 void parse(quint32 src,QByteArray datagram); protected: uint16_t rcin[20]; int rcin_cnt = 0; bool rcin_update = true; uint32_t isRCActive = 0; SBusParser sbus; QList sbuslist; }; #endif // RCPROCESS_H