增加通讯协议
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "base.h"
|
||||
#include <QVector>
|
||||
#include <QSet>
|
||||
|
||||
class TitleBar;
|
||||
class StatusStrip;
|
||||
@@ -19,6 +20,9 @@ class ChassisPage : public BasePage
|
||||
public:
|
||||
explicit ChassisPage(AppContext* ctx, QWidget* parent = nullptr);
|
||||
|
||||
protected:
|
||||
void showEvent(QShowEvent* ev) override; // 进入页面即切至行车模式
|
||||
|
||||
private slots:
|
||||
void refresh();
|
||||
void updateModeGating();
|
||||
@@ -27,6 +31,7 @@ private slots:
|
||||
|
||||
private:
|
||||
QPushButton* makeDirButton(const QString& text, const QString& dir);
|
||||
void sendDirCommand(); // 按当前按住的方向组合下发(档位与转向可同时)
|
||||
|
||||
TitleBar* m_titleBar = nullptr;
|
||||
StatusStrip* m_statusStrip = nullptr;
|
||||
@@ -39,6 +44,7 @@ private:
|
||||
QTimer* m_saveTimer = nullptr;
|
||||
int m_chassisFieldFault = -1;
|
||||
QVector<QPushButton*> m_dirButtons;
|
||||
QSet<QString> m_heldDirs; // 当前按住的方向,可多键同时按
|
||||
};
|
||||
|
||||
#endif // CHASSISPAGE_H
|
||||
|
||||
Reference in New Issue
Block a user