卡丁车构造图解2010汇总.docxVIP

  • 79
  • 0
  • 约1.6万字
  • 约 62页
  • 2020-11-16 发布于天津
  • 举报
end; end; end; end; 上述程序一旦检测到串口事件,就调用 DataProcessing方法读串口数据,并写入数 组,供程序其它部分调用,另外还要检测何时退出线程,程序如下: procedure Tmain form.DataProcess ing 1005 begin clear := CLEARCOMMERROR ( hcom,lperrors,@comms) ; //清除串 口错误 其他 if Clear Then Begin //处理接收数据 ReadFile ( hcom,ReadBuffer,Comms.cblnQue,LPReadNumber,0 ) ReceBytes[l+ArrayOffset] := ReadBuffer[I]; //读串口缓冲区数据并写入数组 1 gameover := (ReceBytes[I+ArrayOffset-1]=Byte ( $FF)) and ( ReceBytes[I+ArrayOffset]=Byte 套 $FF)) ; //终止条件 if gameover the n term in ate; // 退出线程 End; End; 其中,124 将线程的Terminated属性设置为True。线程一旦检测到 Terminated属性为True,就会结束 线程,去执行 On termi nate事件,在On t

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档