⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tbulkthread.~cpp

📁 台湾义统公司ET21X130D摄像头
💻 ~CPP
字号:
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "TBulkThread.h"
#pragma package(smart_init)
#define BULK_INTERVAL_TIME  10
#include "Main.h"
//---------------------------------------------------------------------------

//   Important: Methods and properties of objects in VCL can only be
//   used in a method called using Synchronize, for example:
//
//      Synchronize(UpdateCaption);
//
//   where UpdateCaption could look like:
//
//      void __fastcall TBulkThread::UpdateCaption()
//      {
//        Form1->Caption = "Updated in a thread";
//      }
//---------------------------------------------------------------------------

__fastcall TBulkThread::TBulkThread(bool CreateSuspended)
        : TThread(CreateSuspended)
{
}
//---------------------------------------------------------------------------
void __fastcall TBulkThread::Execute()
{
   //---- Place thread code here ----
   while(!Terminated)
   {
      Sleep(BULK_INTERVAL_TIME);
      Application->ProcessMessages();   //
      getBulkData();
   }
}
//---------------------------------------------------------------------------
void __fastcall TBulkThread::synchronize(getBulkData)
{
   frmMian->m_iFrameRate++;
   const int iDataBufLen = 19200;
   Byte byDataBuf[iDataBufLen] = {0};
   const int iCmdLen = 23;
   Byte byCmdBuf[iCmdLen] = {0};
   if (frmMian->bSetI2CReg_Flag == true)
   {
      frmMian->bSetI2CReg_Flag = false;
      byCmdBuf[0] = 0xAA;  //USB癳

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -