This commit is contained in:
modehua 2023-11-18 01:06:42 -08:00
parent 5cc75d234f
commit 1efab70b36
6 changed files with 8 additions and 17 deletions

View File

@ -7,7 +7,6 @@
#include "CameraParam.h" #include "CameraParam.h"
#include "correct_ultis.h" #include "correct_ultis.h"
#include "USBProtocol.h"
#include "utilsfunc.h" #include "utilsfunc.h"
#include "CImageMerge.h" #include "CImageMerge.h"
#include "Jpegcompress.h" #include "Jpegcompress.h"

View File

@ -3,7 +3,6 @@
#include "MemoryInfo.h" #include "MemoryInfo.h"
#include "SysInforTool.h" #include "SysInforTool.h"
#include "USBProtocol.h"
#include "StopWatch.h" #include "StopWatch.h"
#define BTN_START 0 #define BTN_START 0
@ -31,7 +30,7 @@ Scanner::Scanner(ScannerGlue glue)
capturer->SetParent(this); capturer->SetParent(this);
capturer->set_image_callback(&have_img_callback); capturer->set_image_callback(&have_img_callback);
this_thread::sleep_for(std::chrono::milliseconds(50));
//固件版本 //固件版本
int version=7010; int version=7010;
@ -66,22 +65,19 @@ Scanner::Scanner(ScannerGlue glue)
} }
}; };
sensor = std::make_shared<Sensor>(sysEvent); sensor = std::make_shared<Sensor>(sysEvent);
this_thread::sleep_for(std::chrono::milliseconds(50));
m_keyboard.reset(new huagao::Keyboard(btnevent)); m_keyboard.reset(new huagao::Keyboard(btnevent));
m_keyboard->init(); m_keyboard->init();
this_thread::sleep_for(std::chrono::milliseconds(50));
motorZouzhi.enablePower(true); motorZouzhi.enablePower(true);
motorZouzhi.setSpeed(4000); motorZouzhi.setSpeed(4000);
motorCuozhi.setSpeed(3000); motorCuozhi.setSpeed(3000);
motorCuozhi.setDirection(false); motorCuozhi.setDirection(false);
std::this_thread::sleep_for(std::chrono::milliseconds(50));
FsmState::setScanner(this); FsmState::setScanner(this);
threadRunMessageLoop = std::thread(&Scanner::runMessageLoop, this); threadRunMessageLoop = std::thread(&Scanner::runMessageLoop, this);
Motor::enablePower(true); Motor::enablePower(true);
this_thread::sleep_for(std::chrono::milliseconds(200));
} }
Scanner::~Scanner() Scanner::~Scanner()
@ -222,10 +218,8 @@ void Scanner::runScan()
isPaperInit = true; isPaperInit = true;
} }
this_thread::sleep_for(std::chrono::milliseconds(200)); this_thread::sleep_for(std::chrono::milliseconds(200));
sensor->resetPaperPin();
sensor->resetPaperPin();
capturer->resetimageremain(); capturer->resetimageremain();
capturer->setScanFlag(true); capturer->setScanFlag(true);

View File

@ -1 +0,0 @@
#pragma once

View File

@ -1,7 +1,6 @@
#include "UsbScanner.h" #include "UsbScanner.h"
#include <turbojpeg.h> #include <turbojpeg.h>
#include "JsonConfig.h" #include "JsonConfig.h"
#include "USBProtocol.h"
#include "logs_out.h" #include "logs_out.h"
#include "JsonConfig.h" #include "JsonConfig.h"
#include "StopWatch.h" #include "StopWatch.h"

View File

@ -23,7 +23,7 @@
#include "utilsfunc.h" #include "utilsfunc.h"
#include "correct_ultis.h" #include "correct_ultis.h"
#include <errno.h> #include <errno.h>
#include "USBProtocol.h"
#include "MotorConfig.h" #include "MotorConfig.h"
#include <iomanip> #include <iomanip>

View File

@ -63,7 +63,7 @@ typedef struct
typedef void (*image_callback)(int element); typedef void (*image_callback)(int element);
static std::map<int , sp_COLOR_or_GRAY>mapFradme_SP={ static std::map<int , sp_COLOR_or_GRAY>mapFradme_SP={
{1,{0x08ED1003,0x1ACC1002,CON(G34D,231027)}},//40 ppm {1,{0x08ED1003,0x1ACC1002,CON(G34D,231027)}},//40 ppm
{2,{0x06DB1003,0x14A01002,CON(G3ZY,231102)}},//50 ppm {2,{0x06DB1003,0x14A01002,CON(G3ZY,231118)}},//50 ppm
{3,{0x05591003,0x100E1002,CON(G36D,231027)}},//60 ppm {3,{0x05591003,0x100E1002,CON(G36D,231027)}},//60 ppm
{4,{0x04421003,0x0CD11002,CON(G37D,231027)}},//70 ppm {4,{0x04421003,0x0CD11002,CON(G37D,231027)}},//70 ppm
{5,{0x036c1003,0x0A421002,CON(G38D,231027)}},//80 ppm {5,{0x036c1003,0x0A421002,CON(G38D,231027)}},//80 ppm