|
|
|
@ -1873,20 +1873,20 @@ void CameraPhotoPortDataProcess(SIO_PARAM_SERIAL_DEF *curserial)
|
|
|
|
|
packsize = rtumsg.MsgData[i + 3] + rtumsg.MsgData[i + 2] * 256;
|
|
|
|
|
memmove(&curserial->image.buf[iNo - 1], &rtumsg.MsgData[i + 4], packsize);
|
|
|
|
|
curserial->image.ilen[iNo - 1] = packsize;
|
|
|
|
|
sprintf(szbuf, "收到第%d(总%d包)包长=%d", iNo, srdt.imagepacketnum, packsize);
|
|
|
|
|
sprintf(szbuf, "收到第%d(总%d包)包长=%d", iNo, curserial->image.imagenum, packsize);
|
|
|
|
|
DebugLog(0, szbuf, 'V');
|
|
|
|
|
curserial->RevCmdFlag = 1;
|
|
|
|
|
curserial->FirstCmdTimeCnt = get_msec();
|
|
|
|
|
if (iNo == curserial->SerialCmdidx)
|
|
|
|
|
{
|
|
|
|
|
if (iNo == srdt.imagepacketnum)
|
|
|
|
|
if (iNo == curserial->image.imagenum)
|
|
|
|
|
{ /* 检查是否有漏包*/
|
|
|
|
|
for (pidx = 0; pidx < srdt.imagepacketnum; pidx++)
|
|
|
|
|
for (pidx = 0; pidx < curserial->image.imagenum; pidx++)
|
|
|
|
|
{
|
|
|
|
|
if (curserial->image.ilen[pidx] < 1)
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if (pidx < srdt.imagepacketnum)
|
|
|
|
|
if (pidx < curserial->image.imagenum)
|
|
|
|
|
{
|
|
|
|
|
iNo = pidx;
|
|
|
|
|
recvend = 0;
|
|
|
|
@ -1918,7 +1918,7 @@ void CameraPhotoPortDataProcess(SIO_PARAM_SERIAL_DEF *curserial)
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if ((iNo > srdt.imagepacketnum) || (0 >= srdt.imagepacketnum))
|
|
|
|
|
if ((iNo > curserial->image.imagenum) || (0 >= curserial->image.imagenum))
|
|
|
|
|
{
|
|
|
|
|
curserial->SerialCmdidx = -1;
|
|
|
|
|
}
|
|
|
|
@ -3503,7 +3503,7 @@ void SendCameraCmdFormPollCmdBuf(SIO_PARAM_SERIAL_DEF *pPortParam)
|
|
|
|
|
pPortParam->m_iRevStatus = 0;
|
|
|
|
|
if (pPortParam->fd < 0)
|
|
|
|
|
return;
|
|
|
|
|
len = GM_SerialComSend(&pPortParam->PollCmd[2], pPortParam->cmdlen - 2, pPortParam->fd);
|
|
|
|
|
len = GM_CameraComSend(&pPortParam->PollCmd[2], pPortParam->cmdlen - 2, pPortParam->fd);
|
|
|
|
|
if (len < 1)
|
|
|
|
|
{
|
|
|
|
|
sprintf(buf, "摄像机串口, 发送命令失败!");
|
|
|
|
|