This commit is contained in:
lovelyyoung 2021-12-17 11:53:16 +08:00
parent d905029292
commit f75354868b
8 changed files with 28 additions and 12 deletions

View File

@ -299,7 +299,9 @@ void CA3::updatespeedmode(bool get)
bool bfound = false;
for (size_t i = 0; i < speedmodeMap.size(); i++)
{
if (parent->m_drv->PID == 0x0139 || parent->m_drv->PID == 0x0239)
if (parent->m_drv->PID == 0x0139 || parent->m_drv->PID == 0x0239
|| parent->m_drv->PID == 0x8739
|| parent->m_drv->PID == 0x8629)
{
if (speedmodeMap[i].Speedmode == speedmode)
{
@ -327,7 +329,8 @@ void CA3::updatespeedmode(bool get)
if (cmbindex != -1)
{
auto t_speedmode = speedmodeMap[cmbindex];
if (parent->m_drv->PID == 0x0139 || parent->m_drv->PID == 0x0239)
if (parent->m_drv->PID == 0x0139 || parent->m_drv->PID == 0x0239 ||
parent->m_drv->PID == 0x8739 || parent->m_drv->PID == 0x8629)
{
parent->m_drv->GetSpeedMode(t_speedmode.Speedmode, false);
parent->m_drv->SetSptime(0, t_speedmode.GraySp);

View File

@ -56,7 +56,7 @@ private:
std::map<int, speedmodeparam> speedmodeMap = {
{0,{70,0x42d,0xc88}},
{1,{80,0x37f,0xa7f}},
{2,{90,0x2b6,0x882}},
{2,{90,0x2b6,0x822}},
{3,{100,0x27c,0x775}},
{4,{110,0x27c,0x775}},
{5,{120,0x27c,0x775}},
@ -83,7 +83,7 @@ private:
{7,L"G300_40PPM"},
{8,L"G300_50PPM"},
{9,L"G300_60PPM"},
{10,L"G300_700PPM"},
{10,L"G300_70PPM"},
{11,L"G400_40PPM"},
{12,L"G400_50PPM"},
{13,L"G400_60PPM"},

View File

@ -34,4 +34,3 @@ public:
};
extern CHuaGoCorrectApp *GetMainApp();
//extern CHuaGoCorrectApp theApp;

Binary file not shown.

View File

@ -311,9 +311,9 @@ void CHuaGoCorrectDlg::RefreshTabChange()
// 获取标签控件客户区Rect并对其调整以适合放置标签页
m_tab.GetClientRect(&tabRect);
tabRect.left += 0;
tabRect.right += 0;
tabRect.top += 25;
tabRect.bottom += 2;
tabRect.right += 10;
tabRect.top += 35;
tabRect.bottom += 10;
switch (m_tab.GetCurSel())
{
@ -340,10 +340,13 @@ 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;
config.g200params.paper = 2;
config.g200params.pc_correct = ((CButton*)GetDlgItem(IDC_CKBORGINIMG))->GetCheck();
config.g200params.color = m_iColorIndex == 1 ? 1 : 0;
config.g200params.double_feed_enbale = TRUE;
@ -607,7 +610,10 @@ 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 == 0x8629) ||
(i->vid == 0x31c9 && i->pid == 0x8739))
m_drv.reset(new gscan3399());
else
{

View File

@ -343,6 +343,8 @@ enum Scanner_Reg_Defs
SR_GET_IPADDR,
SR_GET_MBVERSION_LENGHT,
SR_GET_MBVERSION,
SR_GET_USBVIDPID,
SR_SET_USBVIDPID
};
enum Scanner_Cmd_Defs

View File

@ -523,7 +523,13 @@ void gscan3399::GetSpeedMode(int& speedmode, bool get)
void gscan3399::GetOrSetVIDPID(int& value, bool get)
{
if (m_usb.get() && m_usb->is_connected())
{
if (get)
value = scanner_read_reg(m_usb, SR_GET_USBVIDPID);
else
scanner_write_reg(m_usb, SR_SET_USBVIDPID, value);
}
}
void gscan3399::usbcallback(bool isleft, void* usrdata)

Binary file not shown.