parent
d9056ec3d0
commit
cf19411ba9
15
GDevice.cpp
15
GDevice.cpp
|
@ -11,15 +11,20 @@
|
|||
#include <sstream>
|
||||
#include "StopWatch.h"
|
||||
#include "device_common.h"
|
||||
#include "GScan200.h"
|
||||
|
||||
#ifndef WIN32
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#define DSP_CODE_ADDR 0
|
||||
#define USER_ADDR 0x4000
|
||||
|
||||
using namespace std;
|
||||
//class GScan200;
|
||||
|
||||
|
||||
GDevice::GDevice(std::shared_ptr<IUsb> usb)
|
||||
{
|
||||
|
@ -221,7 +226,6 @@ bool GDevice::read_flash(unsigned int addr, void* data, int size)
|
|||
|
||||
const int int_buffer_size = 1024;
|
||||
int index_count = 0;
|
||||
#include <windows.h>
|
||||
static void write_log(std::string fullname, std::string log)
|
||||
{
|
||||
std::string savepath;
|
||||
|
@ -325,11 +329,18 @@ void GDevice::Int_main()
|
|||
}
|
||||
MotorStatus* ms = (MotorStatus*)int_buffer;
|
||||
if (ms->value && 0x7fe) {
|
||||
if(m_eventcall_userdata){
|
||||
((GScan200*)m_eventcall_userdata)->set_scan_status(false);//停止或异常停止时,通知图像处理线程扫描仪已停止
|
||||
}
|
||||
m_run = false;
|
||||
}
|
||||
if (event_call)
|
||||
{
|
||||
//0x3fe ==>b 1111 1111 10
|
||||
//0x3fe ==>b 1111 1111 10 异常位高有效时
|
||||
if (ms->value & 0x3fe) {
|
||||
((GScan200*)m_eventcall_userdata)->set_scan_status(false);
|
||||
event_call(ms->value, m_eventcall_userdata);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue