实现赋码仪命令

升级小板程序失败时停止
This commit is contained in:
ranchuan
2023-12-21 18:51:58 +08:00
parent af964ad733
commit d1e617afd3
22 changed files with 1291 additions and 43 deletions

View File

@@ -11,6 +11,7 @@
#include "QThread"
#include <QNetworkInterface>
#include <QUdpSocket>
#include "QTimer"
// using namespace std;
// using namespace std::placeholders;
@@ -41,6 +42,8 @@ public:
command()
{
socket_ = nullptr;
timer_=nullptr;
networt_state=0;
}
virtual ~command()
{
@@ -49,6 +52,7 @@ public:
}
void send(QByteArray data);
void init_cb();
void timer_cb();
void ready_read_cb();
private:
@@ -56,6 +60,8 @@ private:
QByteArray recv_data;
QHostAddress host_addr;
quint16 port;
QTimer *timer_;
int networt_state;
};