From 8ffcffbddd8679a3535e01a7dd78aea00818018d Mon Sep 17 00:00:00 2001 From: yangjiaxuan <171295266@qq.com> Date: Fri, 28 Jun 2024 18:25:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E5=B7=A5=E5=85=B7=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E6=96=87=E4=BB=B6=E5=B7=A5=E5=85=B7=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=94=AF=E6=8C=81306=E8=AE=BE=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/HGPdtJsonTool/mainwindow.cpp | 10 +++++++++- app/HGPdtJsonTool/mainwindow.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/HGPdtJsonTool/mainwindow.cpp b/app/HGPdtJsonTool/mainwindow.cpp index c735d4e..e232265 100644 --- a/app/HGPdtJsonTool/mainwindow.cpp +++ b/app/HGPdtJsonTool/mainwindow.cpp @@ -31,7 +31,7 @@ void MainWindow::initDeviceInfo() QStringList oemName{ tr("huagao"), tr("microtek"), tr("hanvon"), tr("lanxum"), tr("deli"), tr("unis"), tr("cumtenn") }; ui->comboBox_OEM->addItems(oemName); - QStringList deviceType{ tr("G100-3399"), tr("G200-3399"), tr("G300-3288"), tr("G400-3399") }; + QStringList deviceType{ tr("G100-3399"), tr("G200-3399"), tr("G300-3288"), tr("G306"), tr("G400-3399") }; ui->comboBox_deviceType->addItems(deviceType); int speedTime = 40; @@ -90,6 +90,8 @@ bool MainWindow::loadDefaultItems(DeviceType deviceType) baseName = "G200"; else if (deviceType == DeviceType_G300) baseName = "G300"; + else if (deviceType == DeviceType_G306) + baseName = "G306"; else if (deviceType == DeviceType_G400) baseName = "G400"; @@ -158,6 +160,10 @@ QPair MainWindow::getVidPid(QString oem, QString deviceType) { pid = "0x0300"; } + else if (deviceType == "G306") + { + pid = "0x0306"; + } else if (deviceType == "G400-3399") { pid = "0x0439"; @@ -423,6 +429,8 @@ void MainWindow::on_comboBox_deviceType_currentIndexChanged(const QString &arg1) deviceType = DeviceType_G200; else if (arg1 == "G300-3288") deviceType = DeviceType_G300; + else if (arg1 == "G306") + deviceType = DeviceType_G306; else if (arg1 == "G400-3399") deviceType = DeviceType_G400; diff --git a/app/HGPdtJsonTool/mainwindow.h b/app/HGPdtJsonTool/mainwindow.h index fd0027d..a5a66d7 100644 --- a/app/HGPdtJsonTool/mainwindow.h +++ b/app/HGPdtJsonTool/mainwindow.h @@ -21,6 +21,7 @@ enum DeviceType DeviceType_G100 = 0, DeviceType_G200, DeviceType_G300, + DeviceType_G306, DeviceType_G400, };