代码拉取完成,页面将自动刷新
#ifndef WIDGET_H
#define WIDGET_H
#include <QWidget>
#include <QComboBox>
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QSerialPortInfo>
#include <QSerialPort>
#include <QGridLayout>
#include <QFormLayout>
#include <QTimer>
class QLabel;
class QLineEdit;
class QComboBox;
class QSpinBox;
class QPushButton;
class Widget : public QWidget
{
Q_OBJECT
public:
Widget(QWidget *parent = nullptr);
~Widget();
private slots:
void RefreshSerialPortList(void);
void connectScanPort(void);
void connectDevPort(void);
void handleScanData(void);
void handleDeviceData(void);
void SendCalibPressureCommand(void);
private:
QPushButton m_refreshBtn;
QLabel m_scanLabel;
QComboBox m_scanBox;
QPushButton m_scanBtn;
QLabel m_devLabel;
QComboBox m_devBox;
QPushButton m_devBtn;
QLabel m_scanInfoLabel;
QLineEdit m_scanInfoLine;
QLabel m_devInfoLabel;
QLineEdit m_devInfoLine;
QSerialPort scanPort;
QSerialPort devPort;
QPushButton m_calibBtn;
QLineEdit m_pressLine;
QHBoxLayout hLayout1;
QHBoxLayout hLayout2;
QHBoxLayout hLayout3;
QHBoxLayout hLayout4;
QHBoxLayout hLayout5;
QGridLayout mainLayout;
//QTimer m_CalibTimer;
};
unsigned char calcCRC8( const unsigned char * buf, unsigned int len);
void dump_hex_array(const char *info, unsigned char *buf, unsigned int len);
#endif // WIDGET_H
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。