From 4cb327198c7c92b10f04d0431dfb4cebc554d3e6 Mon Sep 17 00:00:00 2001 From: masayume <1936714878@qq.com> Date: Fri, 17 Dec 2021 13:46:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=97=A0=E6=B3=95=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=8D=E4=BC=91=E7=9C=A0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HuaGoCorrect/A3.cpp | 5 ++- HuaGoCorrect/A3.h | 56 +++++++++++++++++--------------- HuaGoCorrect/HuaGoCorrectDlg.cpp | 5 +-- 3 files changed, 36 insertions(+), 30 deletions(-) diff --git a/HuaGoCorrect/A3.cpp b/HuaGoCorrect/A3.cpp index 9708fce..76513e8 100644 --- a/HuaGoCorrect/A3.cpp +++ b/HuaGoCorrect/A3.cpp @@ -215,7 +215,6 @@ void CA3::UpdateSleepTime(bool get) USES_CONVERSION; std::string str(W2A(str_sp)); int value = atoi(str.c_str()); - if (value <= 0) value = 60; parent->m_drv->SetSleepTime(value); } } @@ -301,6 +300,8 @@ void CA3::updatespeedmode(bool get) { if (parent->m_drv->PID == 0x0139 || parent->m_drv->PID == 0x0239) { + if((parent->m_drv->PID == 0x239) && (i<4)) + continue; if (speedmodeMap[i].Speedmode == speedmode) { m_cmbSpeedmode.SetCurSel(i); @@ -312,6 +313,8 @@ void CA3::updatespeedmode(bool get) } else if (parent->m_drv->PID == 0x0300 || parent->m_drv->PID == 0x0400) { + if ((parent->m_drv->PID == 0x0400) && (i < 12)) + continue; int startindex = parent->m_drv->PID == 0x0300 ? 6 : 10; m_cmbSpeedmode.SetCurSel(startindex+ speedmode); bfound = true; diff --git a/HuaGoCorrect/A3.h b/HuaGoCorrect/A3.h index 2f3f035..eaee330 100644 --- a/HuaGoCorrect/A3.h +++ b/HuaGoCorrect/A3.h @@ -56,39 +56,41 @@ private: std::map speedmodeMap = { {0,{70,0x42d,0xc88}}, {1,{80,0x37f,0xa7f}}, - {2,{90,0x2b6,0x882}}, - {3,{100,0x27c,0x775}}, - {4,{110,0x27c,0x775}}, - {5,{120,0x27c,0x775}}, - {6,{130,0x27c,0x775}}, - {7,{1,0,0}}, - {8,{2,0,0}}, - {9,{3,0,0}}, - {10,{4,0,0}}, - {11,{1,0,0}}, - {12,{2,0,0}}, - {13,{3,0,0}}, - {14,{4,0,0}}, - {15,{5,0,0}} + {2,{90,0x2b6,0x822}}, + {3,{110,0x24e,0x706}}, + {4,{100,0x27c,0x775}}, + {5,{110,0x27c,0x775}}, + {6,{120,0x27c,0x775}}, + {7,{130,0x27c,0x775}}, + {8,{1,0,0}}, + {9,{2,0,0}}, + {10,{3,0,0}}, + {11,{4,0,0}}, + {12,{1,0,0}}, + {13,{2,0,0}}, + {14,{3,0,0}}, + {15,{4,0,0}}, + {16,{5,0,0}} }; std::map speedmodeMapString = { {0,L"G139_70PPM"}, {1,L"G139_80PPM"}, {2,L"G139_90PPM"}, - {3,L"G239_100PPM"}, - {4,L"G239_110PPM"}, - {5,L"G239_120PPM"}, - {6,L"G239_130PPM"}, - {7,L"G300_40PPM"}, - {8,L"G300_50PPM"}, - {9,L"G300_60PPM"}, - {10,L"G300_700PPM"}, - {11,L"G400_40PPM"}, - {12,L"G400_50PPM"}, - {13,L"G400_60PPM"}, - {14,L"G400_70PPM"}, - {15,L"G400_80PPM"}, + {3,L"G139_110PPM"}, + {4,L"G239_100PPM"}, + {5,L"G239_110PPM"}, + {6,L"G239_120PPM"}, + {7,L"G239_130PPM"}, + {8,L"G300_40PPM"}, + {9,L"G300_50PPM"}, + {10,L"G300_60PPM"}, + {11,L"G300_700PPM"}, + {12,L"G400_40PPM"}, + {13,L"G400_50PPM"}, + {14,L"G400_60PPM"}, + {15,L"G400_70PPM"}, + {16,L"G400_80PPM"}, }; CComboBox m_cmbSpeedmode; public: diff --git a/HuaGoCorrect/HuaGoCorrectDlg.cpp b/HuaGoCorrect/HuaGoCorrectDlg.cpp index 3a77d0a..caad4bf 100644 --- a/HuaGoCorrect/HuaGoCorrectDlg.cpp +++ b/HuaGoCorrect/HuaGoCorrectDlg.cpp @@ -340,7 +340,7 @@ void CHuaGoCorrectDlg::RefreshTabChange() void CHuaGoCorrectDlg::Scan() { HGScanConfig config = { 0 }; - if (m_drv->PID == 0x0139 || m_drv->PID == 0x0239) + if (m_drv->PID == 0x0139 || m_drv->PID == 0x0239 || m_drv->PID == 0x8739 || m_drv->PID == 0x8629) { config.g200params.dpi = 1;//only support 200DPI config.g200params.paper = 0; @@ -607,7 +607,8 @@ void CHuaGoCorrectDlg::OnCbnSelchangeCmbUsbs() { if (j == ret) { - if ((i->vid == 0x3072 && i->pid == 0x0139) || (i->vid == 0x3072 && i->pid == 0x0239)) + if ((i->vid == 0x3072 && i->pid == 0x0139) || (i->vid == 0x3072 && i->pid == 0x0239) + || (i->vid == 0x31c9 && i->pid == 0x8739) || (i->vid == 0x31c9 && i->pid == 0x8629)) m_drv.reset(new gscan3399()); else {