增加通讯协议

This commit is contained in:
xu
2026-10-14 09:59:42 +08:00
parent 32878a9a80
commit 950e9e6c9e
102 changed files with 5538 additions and 2679 deletions
+6
View File
@@ -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