增加通讯协议
This commit is contained in:
+5
-2
@@ -3,7 +3,7 @@
|
||||
#include "alarmbanner.h"
|
||||
#include "datacard.h"
|
||||
#include "ledindicator.h"
|
||||
#include "udpcommunication.h"
|
||||
#include "car.h"
|
||||
#include "confirmdialog.h"
|
||||
#include <QVBoxLayout>
|
||||
#include <QHBoxLayout>
|
||||
@@ -68,6 +68,7 @@ WashBasePage::WashBasePage(AppContext* ctx, const QString& title, const QString&
|
||||
m_fFoam = m_washCard->addField("发泡倍数", "0");
|
||||
m_fAirFault = m_washCard->addField("空压机故障代码", "");
|
||||
m_fPlungerFault = m_washCard->addField("柱塞泵故障代码", "");
|
||||
m_washCard->indentRows(); // 行文字缩进到中间偏左(卡片很宽,贴左缘会显得空)
|
||||
main->addWidget(m_washCard, 1);
|
||||
|
||||
// 右侧操作列
|
||||
@@ -109,6 +110,7 @@ WashBasePage::WashBasePage(AppContext* ctx, const QString& title, const QString&
|
||||
|
||||
m_factory = button("恢复出厂值", "", bottom);
|
||||
m_factory->setFixedSize(220, 64);
|
||||
m_factory->setStyleSheet(cancelButtonStyle(40)); // 选中(悬停/按下/焦点)红底白字
|
||||
connect(m_factory, &QPushButton::clicked, this, &WashBasePage::onFactory);
|
||||
bottomLay->addWidget(m_factory);
|
||||
bottomLay->addSpacing(20);
|
||||
@@ -134,6 +136,7 @@ WashBasePage::WashBasePage(AppContext* ctx, const QString& title, const QString&
|
||||
|
||||
m_back = button("返回", "", bottom);
|
||||
m_back->setFixedSize(144, 76);
|
||||
m_back->setStyleSheet(cancelButtonStyle(40)); // 选中(悬停/按下/焦点)红底白字
|
||||
connect(m_back, &QPushButton::clicked, this, &WashBasePage::onBack);
|
||||
bottomLay->addWidget(m_back);
|
||||
|
||||
@@ -145,7 +148,7 @@ WashBasePage::WashBasePage(AppContext* ctx, const QString& title, const QString&
|
||||
connect(m_faultTimer, &QTimer::timeout, this, &WashBasePage::rotateFaults);
|
||||
m_faultTimer->start();
|
||||
|
||||
connect(ctx->comm(), &UdpCommunication::telemetryUpdated, this, &WashBasePage::refresh);
|
||||
connect(ctx->comm(), &CarCommunication::telemetryUpdated, this, &WashBasePage::refresh);
|
||||
updateGating();
|
||||
refresh();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user