提交代码

This commit is contained in:
zhangsheng 2025-05-07 19:46:31 +08:00
parent ee2d142182
commit 020e7fb47e
4 changed files with 10 additions and 2 deletions

View File

@ -95,6 +95,7 @@ void MyTcpClient::onReadyRead() {
} else { } else {
// 2. 根据头部的 len 读取剩余数据 // 2. 根据头部的 len 读取剩余数据
qint64 remainingBytes = m_currentHead.len - (m_buffer.size() - sizeof(PackageHead)); qint64 remainingBytes = m_currentHead.len - (m_buffer.size() - sizeof(PackageHead));
if (remainingBytes <= 0) { if (remainingBytes <= 0) {
// 数据已经完整,触发信号 // 数据已经完整,触发信号
emit dataReceived(m_buffer); emit dataReceived(m_buffer);

View File

@ -290,6 +290,13 @@ typedef struct {
char data[0]; // 文件内容 char data[0]; // 文件内容
} PackageHead; } PackageHead;
typedef struct {
uint8_t head[3]; // 固定值0xAA55AA
uint8_t cmd;
uint8_t code;
int len;
} CommonRsp;
typedef struct { typedef struct {
uint8_t card_id; // 0xff是本机其它子卡是115 uint8_t card_id; // 0xff是本机其它子卡是115
char data[0]; char data[0];

View File

@ -1765,7 +1765,7 @@
<item> <item>
<widget class="QLabel" name="label_standby"> <widget class="QLabel" name="label_standby">
<property name="text"> <property name="text">
<string>5-6</string> <string>--</string>
</property> </property>
</widget> </widget>
</item> </item>

View File

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>Form</string> <string>触发配置</string>
</property> </property>
<widget class="QWidget" name="layoutWidget"> <widget class="QWidget" name="layoutWidget">
<property name="geometry"> <property name="geometry">