2023-07-17 03:29:37 +00:00
|
|
|
#include "Scanner.h"
|
|
|
|
#include <iostream>
|
|
|
|
#include "filetools.h"
|
|
|
|
#include "fpgacontrol.h"
|
|
|
|
#include "MemoryInfo.h"
|
|
|
|
#include "SysInforTool.h"
|
|
|
|
#include "USBProtocol.h"
|
|
|
|
|
2023-10-10 10:12:15 +00:00
|
|
|
#define BTN_START 0
|
|
|
|
#define BTN_STOP 1 //按键停止扫描
|
|
|
|
#define BTN_LOW_POWER 2 //按键低功耗
|
|
|
|
#define BTN_NORMAL_POWER 3 //按键正常模式 (退出低功耗)
|
2023-07-17 03:29:37 +00:00
|
|
|
|
|
|
|
Scanner::Scanner(ScannerGlue glue)
|
|
|
|
: motorZouzhi(),
|
|
|
|
motorCuozhi(),
|
|
|
|
m_glue(glue),
|
|
|
|
m_isPulling(false),
|
|
|
|
m_isDoublePaper(false),
|
|
|
|
isPaperInit(false),
|
|
|
|
m_jamPaper(false),
|
|
|
|
m_jamIn(false),
|
|
|
|
m_correctting(false),
|
|
|
|
waitpapertime(200),
|
|
|
|
m_scansysinfo(nullptr)
|
|
|
|
{
|
|
|
|
cisvendor = GetCisType();
|
2023-09-19 02:12:37 +00:00
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
m_scaninfo = GetScanInfoFromJson();
|
|
|
|
|
2023-09-19 02:12:37 +00:00
|
|
|
capturer.reset(new MultiFrameCapture(m_glue,cisvendor));
|
2023-07-17 03:29:37 +00:00
|
|
|
|
|
|
|
capturer->SetParent(this);
|
2023-09-19 02:12:37 +00:00
|
|
|
//固件版本
|
|
|
|
int version=7010;
|
2023-07-17 03:29:37 +00:00
|
|
|
|
|
|
|
auto btnevent = [this](const int eventtype)
|
|
|
|
{
|
|
|
|
if (!IsScanning()) //未扫描
|
|
|
|
{
|
2023-10-19 09:29:46 +00:00
|
|
|
switch (eventtype)
|
2023-10-10 10:12:15 +00:00
|
|
|
{
|
2023-10-19 09:29:46 +00:00
|
|
|
case BTN_LOW_POWER:
|
|
|
|
stop_countdown();
|
|
|
|
system("sh /mnt/flash-disk/low_power.sh 1");
|
|
|
|
break;
|
|
|
|
case BTN_NORMAL_POWER:
|
|
|
|
system("sh /mnt/flash-disk/low_power.sh 0");
|
|
|
|
start_enter_lowpwoer();
|
|
|
|
break;
|
|
|
|
case BTN_START:
|
|
|
|
/* code */
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
2023-10-10 10:12:15 +00:00
|
|
|
}
|
2023-07-17 03:29:37 +00:00
|
|
|
}
|
|
|
|
else //扫描中
|
|
|
|
{
|
2023-10-10 10:12:15 +00:00
|
|
|
if (eventtype == BTN_STOP)
|
2023-07-17 03:29:37 +00:00
|
|
|
{
|
|
|
|
put(S_EVT_STOP_SCAN);
|
2023-10-19 09:29:46 +00:00
|
|
|
printf("keyboard cancel scan\r\n");
|
2023-07-17 03:29:37 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
sensor = std::make_shared<Sensor>(sysEvent);
|
2023-08-31 08:37:05 +00:00
|
|
|
this_thread::sleep_for(std::chrono::milliseconds(50));
|
2023-07-17 03:29:37 +00:00
|
|
|
m_keyboard.reset(new huagao::Keyboard(btnevent));
|
|
|
|
m_keyboard->init();
|
2023-08-31 08:37:05 +00:00
|
|
|
this_thread::sleep_for(std::chrono::milliseconds(50));
|
2023-07-17 03:29:37 +00:00
|
|
|
motorZouzhi.enablePower(true);
|
|
|
|
motorZouzhi.setSpeed(4000);
|
|
|
|
motorCuozhi.setSpeed(3000);
|
|
|
|
motorCuozhi.setDirection(false);
|
2023-09-19 02:40:47 +00:00
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
2023-09-19 02:40:47 +00:00
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
FsmState::setScanner(this);
|
|
|
|
threadRunMessageLoop = std::thread(&Scanner::runMessageLoop, this);
|
|
|
|
Motor::enablePower(true);
|
2023-08-31 08:37:05 +00:00
|
|
|
this_thread::sleep_for(std::chrono::milliseconds(200));
|
2023-09-19 02:40:47 +00:00
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Scanner::~Scanner()
|
|
|
|
{
|
|
|
|
Motor::enablePower(false);
|
|
|
|
sysEvent.Clear();
|
|
|
|
sysEvent.ShutDown();
|
|
|
|
bMsgLoop = false;
|
|
|
|
threadRunMessageLoop.join();
|
|
|
|
|
|
|
|
m_DstScannum = 0;
|
|
|
|
if (threadRunScan.joinable())
|
|
|
|
threadRunScan.join();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void Scanner::updateSpeedMode(int speed)
|
|
|
|
{
|
|
|
|
m_scaninfo = GetScanInfoFromJson();
|
|
|
|
if(m_scaninfo.SpeedMode==0)
|
|
|
|
m_scaninfo.SpeedMode=3;
|
2023-10-07 06:08:42 +00:00
|
|
|
|
2023-09-14 02:46:04 +00:00
|
|
|
unsigned int t_dpi = m_config.params.dpi;
|
2023-09-19 02:40:47 +00:00
|
|
|
|
2023-09-14 02:46:04 +00:00
|
|
|
if(typeid(*capturer)==typeid(MultiFrameCapture))
|
2023-10-19 09:29:46 +00:00
|
|
|
if(m_config.params.pageSize == 17 || m_config.params.pageSize == 19 ) //长文稿采用600dpi模式扫描
|
2023-09-14 02:46:04 +00:00
|
|
|
t_dpi = 3;
|
2023-10-19 09:29:46 +00:00
|
|
|
if (m_config.params.slow_moire) //摩尔纹使用300dpi进行采集
|
|
|
|
{
|
|
|
|
t_dpi = 2;
|
|
|
|
}
|
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
motorCuozhi.speedChange(m_scaninfo.SpeedMode, t_dpi,m_config.params.isColor);
|
|
|
|
motorZouzhi.speedChange(m_scaninfo.SpeedMode, t_dpi,m_config.params.isColor);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Scanner::startScan()
|
|
|
|
{
|
|
|
|
if (threadRunScan.joinable())
|
|
|
|
threadRunScan.join();
|
|
|
|
stop_countdown();
|
2023-10-19 09:29:46 +00:00
|
|
|
this_thread::sleep_for(std::chrono::milliseconds(200));
|
2023-07-17 03:29:37 +00:00
|
|
|
updateSpeedMode(4);
|
|
|
|
// //开始进行扫描
|
|
|
|
threadRunScan = std::thread(&Scanner::runScan, this);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Scanner::runMessageLoop()
|
|
|
|
{
|
|
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(3000));//避免scanpin io 开始异常
|
|
|
|
GetSysInfo();//待fpga 重启完成
|
|
|
|
FsmState *fsmState = FsmStateManagerEx<InitState>::GetState();
|
|
|
|
while (bMsgLoop)
|
|
|
|
{
|
|
|
|
ScanEvent evt = sysEvent.Take();
|
|
|
|
fsmState = fsmState->on_event(evt);
|
|
|
|
processevent(fsmState, evt);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void Scanner::processevent(FsmState *fsmState, ScanEvent event)
|
|
|
|
{
|
|
|
|
if (fsmState == nullptr)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (typeid(*fsmState) == typeid(CoverOpenState))
|
|
|
|
{
|
|
|
|
m_glue.m_deviceevent(1, "Cover Open");
|
|
|
|
}
|
|
|
|
else if (event == S_EVT_SCAN_STOPPED)
|
|
|
|
{
|
|
|
|
if (!m_correctting)
|
|
|
|
{
|
|
|
|
m_glue.m_deviceevent(70, "Scan done");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (event == S_EVT_JAM_IN)
|
|
|
|
{
|
|
|
|
m_glue.m_deviceevent(4, "Feed error");
|
|
|
|
}
|
|
|
|
else if (event == S_EVT_DOUBLEPAPER)
|
|
|
|
{
|
|
|
|
m_glue.m_deviceevent(16, "Double feed");
|
|
|
|
}
|
|
|
|
else if (event == S_EVT_JAM_OUT || typeid(*fsmState) == typeid(ErrorJamState))
|
|
|
|
{
|
|
|
|
m_glue.m_deviceevent(8, "Jam out");
|
|
|
|
}
|
|
|
|
else if (typeid(*fsmState) == typeid(ErrorState) && m_jamIn == true)
|
|
|
|
{
|
|
|
|
m_glue.m_deviceevent(4, "Feed error");
|
|
|
|
}
|
|
|
|
if (!IsScanning() && (typeid(*fsmState) == typeid(ErrorJamState) ||
|
|
|
|
typeid(*fsmState) == typeid(CoverOpenState) ||
|
|
|
|
(typeid(*fsmState) == typeid(ErrorState) && m_jamIn == true)))
|
|
|
|
{
|
|
|
|
if (!m_correctting)
|
|
|
|
{
|
|
|
|
m_glue.m_deviceevent(70, "Scan Stop");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void Scanner::runScan()
|
|
|
|
{
|
|
|
|
LOG("-------------Scanner RunScan Start-------------\r\n");
|
|
|
|
capturer->open();
|
|
|
|
motorZouzhi.start();
|
|
|
|
motorCuozhi.pauseWaitForThread();
|
2023-08-31 08:37:05 +00:00
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
if (!isPaperInit)
|
|
|
|
{
|
2023-09-19 02:40:47 +00:00
|
|
|
preFeed();
|
2023-07-17 03:29:37 +00:00
|
|
|
isPaperInit = true;
|
|
|
|
}
|
2023-08-31 08:37:05 +00:00
|
|
|
this_thread::sleep_for(std::chrono::milliseconds(200));
|
2023-10-09 01:26:25 +00:00
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
sensor->resetPaperPin();
|
2023-08-31 08:37:05 +00:00
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
capturer->clearimages();
|
|
|
|
capturer->resetimageremain();
|
|
|
|
capturer->setScanFlag(true);
|
2023-08-09 07:31:27 +00:00
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
bool b_autosize = m_config.params.pageSize==(int)PaperSize::G400_AUTO ||
|
|
|
|
m_config.params.pageSize==(int)PaperSize::G400_MAXAUTO ||
|
|
|
|
m_config.params.pageSize==(int)PaperSize::G400_MAXSIZE;
|
|
|
|
StopWatch sw;
|
2023-09-14 02:46:04 +00:00
|
|
|
StopWatch sw1;
|
|
|
|
StopWatch sw2;
|
2023-07-17 03:29:37 +00:00
|
|
|
while (m_DstScannum > 0)
|
|
|
|
{
|
2023-09-14 02:46:04 +00:00
|
|
|
sw1.reset();
|
2023-07-17 03:29:37 +00:00
|
|
|
m_isDoublePaper = false;
|
|
|
|
m_jamPaper = false;
|
|
|
|
m_jamIn = false;
|
|
|
|
if (!sensor->isPaperStandby()) //无纸
|
|
|
|
{
|
|
|
|
if (!sensor->waitPaperStandBy(0))
|
|
|
|
{
|
|
|
|
put(S_EVT_STOP_SCAN);
|
|
|
|
LOG("STOP STOP STOP RUNSCAN \n");
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
sensor->enableDoubleSensor(m_config.params.doubleFeeded);
|
2023-09-19 02:40:47 +00:00
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
if (m_DstScannum == 0) //被取消扫描了
|
|
|
|
{
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
motorCuozhi.startAsyn();
|
|
|
|
if (!sensor->isPaperStandby())
|
|
|
|
{
|
|
|
|
put(S_EVT_STOP_SCAN);
|
|
|
|
isRested = false;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
isRested = false;
|
2023-09-19 01:24:12 +00:00
|
|
|
if (!sensor->waitPaperIn(3000))//
|
2023-07-17 03:29:37 +00:00
|
|
|
{
|
|
|
|
if (!m_isDoublePaper)
|
|
|
|
{
|
|
|
|
m_glue.m_deviceevent(4, "Feed error");
|
|
|
|
m_jamIn = true;
|
|
|
|
put(S_EVT_JAM_IN);
|
|
|
|
m_scaninfo.JamInNum++;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
2023-09-14 02:46:04 +00:00
|
|
|
printf("检测到纸张的时间:%f\r\n",sw.elapsed_ms());//检测到纸张
|
|
|
|
|
2023-07-18 02:29:03 +00:00
|
|
|
capturer->snap();
|
2023-07-17 03:29:37 +00:00
|
|
|
motorCuozhi.pauseWaitForThread();
|
|
|
|
int i = 0;
|
|
|
|
int max = 7;
|
2023-09-14 02:46:04 +00:00
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
if(m_config.params.pageSize >= (int)PaperSize::G400_LONGLETTER)
|
|
|
|
max = m_scaninfo.SpeedMode>3?10:25;
|
|
|
|
else
|
|
|
|
max = m_scaninfo.SpeedMode>3?5:8;
|
2023-09-14 02:46:04 +00:00
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
max = m_config.params.dpi > 2 ? 30 : max * m_config.params.dpi;
|
2023-09-14 02:46:04 +00:00
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
if(m_config.params.pageSize == 17 || m_config.params.pageSize == 19)
|
2023-09-14 02:46:04 +00:00
|
|
|
{
|
2023-07-17 03:29:37 +00:00
|
|
|
max = 200;
|
2023-09-14 02:46:04 +00:00
|
|
|
}
|
|
|
|
|
2023-08-31 08:37:05 +00:00
|
|
|
waitpapertime = 200;
|
2023-09-14 02:46:04 +00:00
|
|
|
sw2.reset();
|
2023-07-17 03:29:37 +00:00
|
|
|
while (!sensor->waitPaperOut(waitpapertime) && i < max)
|
|
|
|
{
|
2023-09-14 02:46:04 +00:00
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
i++;
|
|
|
|
if (!sensor->isPaperIn())
|
|
|
|
{
|
|
|
|
LOG("paper 假卡纸了。。。。。\n");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (i == max && sensor->isPaperIn())
|
|
|
|
{
|
|
|
|
|
|
|
|
if (!m_isDoublePaper)
|
|
|
|
{
|
|
|
|
m_glue.m_deviceevent(8, "Jam out"); //卡纸
|
|
|
|
m_jamPaper = true;
|
|
|
|
put(S_EVT_JAM_OUT);
|
|
|
|
m_scaninfo.JamOutNum++;
|
|
|
|
LOG("paper 卡纸了。。。。。\n");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// m_glue.m_deviceevent(16); //双张
|
|
|
|
// LOG("paper 双张了。。。。。\n");
|
|
|
|
m_scaninfo.DoubleNum++;
|
|
|
|
}
|
2023-07-18 02:29:03 +00:00
|
|
|
capturer->stopsnap(b_autosize);
|
|
|
|
capturer->waitsnapdone(1);//等待采集完成
|
|
|
|
this_thread::sleep_for(std::chrono::milliseconds(500));//200 80ms 600 260ms
|
2023-07-17 03:29:37 +00:00
|
|
|
break;
|
|
|
|
}
|
2023-09-04 03:28:08 +00:00
|
|
|
//LOG("\nclose double sensor %s\n",GetCurrentTimeStamp(2).c_str());
|
2023-07-17 03:29:37 +00:00
|
|
|
sensor->enableDoubleSensor(false);
|
|
|
|
|
|
|
|
if(b_autosize)
|
|
|
|
{
|
|
|
|
int dly_speed= (5 - m_scaninfo.SpeedMode)*10;
|
|
|
|
int delay = m_config.params.dpi==0x02?70:(m_config.params.dpi==0x03?350: 20);
|
|
|
|
if((m_config.params.pageSize == 17 || m_config.params.pageSize == 19)&&(delay < 350))
|
2023-09-14 02:46:04 +00:00
|
|
|
{
|
2023-07-17 03:29:37 +00:00
|
|
|
delay = 350;
|
2023-09-14 02:46:04 +00:00
|
|
|
}
|
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
if(m_config.params.pageSize == 18)
|
|
|
|
delay = std::max(delay,80);
|
2023-09-14 02:46:04 +00:00
|
|
|
|
|
|
|
delay += dly_speed;
|
2023-09-19 01:24:12 +00:00
|
|
|
if (m_config.params.dpi == 3)
|
|
|
|
{
|
|
|
|
delay = 0;
|
|
|
|
}
|
2023-07-17 03:29:37 +00:00
|
|
|
this_thread::sleep_for(std::chrono::milliseconds(delay));//200 80ms 600 260ms
|
|
|
|
}
|
|
|
|
if(b_autosize)
|
|
|
|
{
|
2023-09-19 01:24:12 +00:00
|
|
|
int de = (5 - m_scaninfo.SpeedMode)*10*m_config.params.dpi;
|
|
|
|
if (de == 3)
|
|
|
|
{
|
|
|
|
de = 0;
|
|
|
|
}
|
|
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(de));
|
2023-07-17 03:29:37 +00:00
|
|
|
if(sensor->isPaperAtScan())
|
|
|
|
{
|
|
|
|
m_glue.m_deviceevent((int)HG_ScannerStatus::PAPER_HOLE,"paper have hole");
|
2023-07-20 03:48:38 +00:00
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
capturer->waitsnapdone(1);//等待采集完成
|
2023-07-20 03:48:38 +00:00
|
|
|
|
|
|
|
capturer->stopsnap(b_autosize);
|
2023-07-17 03:29:37 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2023-09-14 02:46:04 +00:00
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
capturer->stopsnap(b_autosize);
|
|
|
|
capturer->waitsnapdone(m_isDoublePaper || m_jamPaper);//等待采集完成
|
|
|
|
m_DstScannum--;
|
|
|
|
m_scaninfo.RollerNum++;
|
|
|
|
m_scaninfo.TotalScanned++;
|
2023-08-09 07:31:27 +00:00
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
if (m_DstScannum == 0)
|
|
|
|
{
|
|
|
|
this_thread::sleep_for(std::chrono::milliseconds(200));
|
|
|
|
|
|
|
|
put(S_EVT_STOP_SCAN);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
sw.reset();
|
2023-09-14 02:46:04 +00:00
|
|
|
while (meminfo->GetMemoryUsed() > 90.0f||(m_config.params.dpi ==0x03 && capturer->getimageremain()>1)) //内存占用高于75%
|
2023-07-17 03:29:37 +00:00
|
|
|
{
|
2023-08-31 08:37:05 +00:00
|
|
|
if (sw.elapsed_s() < 50.0)
|
|
|
|
{
|
2023-07-17 03:29:37 +00:00
|
|
|
std::this_thread::yield();
|
2023-08-31 08:37:05 +00:00
|
|
|
}
|
2023-07-17 03:29:37 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
put(S_EVT_STOP_SCAN);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2023-08-09 07:31:27 +00:00
|
|
|
|
2023-09-14 02:46:04 +00:00
|
|
|
printf("一张纸完成时间:%f\r\n",sw1.elapsed_ms());
|
|
|
|
if( m_config.params.dpi == 3)
|
|
|
|
this_thread::sleep_for(std::chrono::milliseconds(3000));
|
2023-07-17 03:29:37 +00:00
|
|
|
}
|
2023-08-09 07:31:27 +00:00
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
m_DstScannum = 0;
|
|
|
|
sensor->enableDoubleSensor(false);
|
|
|
|
sensor->resetPaperPin();
|
|
|
|
capturer->setScanFlag(false);
|
2023-08-09 07:31:27 +00:00
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
int t_delay = m_config.params.dpi == 0x02 ? 150 : (m_config.params.dpi == 0x03 ? 350 : 100);
|
2023-08-09 07:31:27 +00:00
|
|
|
|
2023-09-15 06:05:42 +00:00
|
|
|
this_thread::sleep_for(std::chrono::milliseconds(t_delay)); //走纸多转一会儿 确保扫描传感器过了之后 纸能出完
|
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
capturer->setFanMode(0);
|
2023-09-14 02:46:04 +00:00
|
|
|
|
2023-08-09 07:31:27 +00:00
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
LOG("\n--------------------------scan done --------------------------------\n");
|
2023-08-09 07:31:27 +00:00
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void Scanner::CreatCorrectData(int correctmode)
|
|
|
|
{
|
|
|
|
m_correctting = true;
|
|
|
|
capturer->createCorrect(correctmode);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Scanner::preFeed()
|
|
|
|
{
|
|
|
|
int sleeptime = 300;
|
|
|
|
motorCuozhi.feeding();
|
|
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(sleeptime));
|
|
|
|
motorCuozhi.pause();
|
|
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(300));
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string Scanner::GetSysInfo()
|
|
|
|
{
|
|
|
|
meminfo = MemoryInfo::GetInstance();
|
2023-09-19 02:40:47 +00:00
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
auto scannerinfo = GetScanInfo();
|
|
|
|
auto fwverion = mapFradme_SP[scannerinfo.SpeedMode].FWVERSIO;
|
|
|
|
ScannerSysInfo info = {
|
|
|
|
.CPU = SCPU::CPU_3288,
|
|
|
|
.Systype = SysType::Sys_Linux_Debian,
|
|
|
|
.Screentype = ScreenType::ST_None,
|
|
|
|
.MtBoardVersion = 0x20220114,
|
|
|
|
.MtType = GetSMBType(),
|
2023-09-19 02:12:37 +00:00
|
|
|
.FPGAVersion = 0,
|
2023-07-17 03:29:37 +00:00
|
|
|
.Cistype = (HGCISType)GetCisType(),
|
|
|
|
.ResSup = {200, 300, 0},
|
|
|
|
.MemTotal = 0,
|
|
|
|
.DiskTotal = 100,
|
|
|
|
.DiskUsed = 0,
|
|
|
|
.KernelVersion = "",
|
|
|
|
.Have_EthernPort = 0,
|
|
|
|
.ServiceVersion = fwverion,
|
|
|
|
.UsbProtocol = 1.0};
|
2023-09-19 02:40:47 +00:00
|
|
|
|
2023-07-17 03:29:37 +00:00
|
|
|
m_scansysinfo.reset(new SysInforTool(info));
|
|
|
|
return m_scansysinfo->GetSysInfo();
|
|
|
|
}
|