43 lines
1.5 KiB
C++
43 lines
1.5 KiB
C++
#pragma once
|
||
#include "G400ScanConfig.h"
|
||
|
||
G400ScanConfig::G400ScanConfig(GScanCap& gcap,ScannerSerial serial)
|
||
{
|
||
cfg.params.doubleFeeded = gcap.hardwareParam.doubleFeedDetection;
|
||
LOG("cfg.params.doubleFeeded = %s \n",cfg.params.doubleFeeded?"true":"false");
|
||
cfg.params.dpi = 1;//gcap.resolution_dst <= 200.0f ? G400_DPI::G400_D200 : (gcap.resolution_dst <= 300.0f ? G400_DPI::G400_D300 : G400_DPI::G400_D600);
|
||
LOG("cfg.params.dpi = %s \n",cfg.params.dpi==1?"200":(cfg.params.dpi==0?"300":"600"));
|
||
cfg.params.enableLed = 1;
|
||
if (gcap.imageProcess.filter != 3)
|
||
cfg.params.isColor = 1;
|
||
else
|
||
cfg.params.isColor = SupPixelTypes[gcap.pixelType];
|
||
cfg.params.enableStable = 0;//gcap.hardwarecaps.en_stapledetect==0?0:1;
|
||
cfg.params.isCorrect = 1;//1 <20><><EFBFBD><EFBFBD>У<EFBFBD><D0A3>
|
||
hgsize size;
|
||
PaperStatus ps = { (uint32_t)gcap.paperSize,gcap.paperAlign };
|
||
if(serial == ScannerSerial::G300Serial){
|
||
cfg.params.pageSize = SupPaperTyps_G300[ps];
|
||
size = PaperSize.GetPaperSize(TwSS::A4, 200.0f, gcap.paperAlign,serial);//G300 <20><><EFBFBD>֧<EFBFBD><D6A7>A4<41><34><EFBFBD><EFBFBD>
|
||
}
|
||
else
|
||
{
|
||
cfg.params.pageSize = SupPaperTyps_G400[ps];
|
||
size = PaperSize.GetPaperSize(gcap.paperSize, 200.0f, gcap.paperAlign,serial);
|
||
}
|
||
|
||
LOG("cfg.params.pageSize =%d \n",cfg.params.pageSize);
|
||
cfg.params.dstHeight = (int)((size.cy+200)/100);
|
||
cfg.params.reversed1 = cfg.params.reversed2 = 0;
|
||
cfg.params.isCorrect = gcap.is_correct;
|
||
}
|
||
|
||
G400ScanConfig::~G400ScanConfig()
|
||
{
|
||
}
|
||
|
||
unsigned int G400ScanConfig::GetData()
|
||
{
|
||
return cfg.value;
|
||
}
|