增加log,调试

NWMQTT
jxjajs 2 months ago
parent ec5799f167
commit 1f3943b34b

@ -2035,7 +2035,7 @@ void MakeCameraPhotoCommand(SIO_PARAM_SERIAL_DEF *pPortParam, uint8_t cmdidx, in
{
int i, icurtime;
u_char *sendbuf;
//char szbuf[128];
char szbuf[128];
sendbuf = pPortParam->PollCmd;
@ -2096,6 +2096,11 @@ void MakeCameraPhotoCommand(SIO_PARAM_SERIAL_DEF *pPortParam, uint8_t cmdidx, in
sendbuf[3] = (uint8_t)((i - 10) >> 8);
sendbuf[4] = (uint8_t)(i - 10);
pPortParam->cmdlen = i;
if(0x08 == cmdidx)
{
strcpy(szbuf, "生成查询云台位置命令!");
DebugLog(0, szbuf, 'I');
}
//return;
}
@ -3114,6 +3119,7 @@ void SendCameraCmdFormPollCmdBuf(SIO_PARAM_SERIAL_DEF *pPortParam)
char buf[128];
int len, ret;
int64_t lctime;
char szbuf[512];
memset(buf, 0, sizeof(buf));
lctime = get_msec();
@ -3126,6 +3132,9 @@ void SendCameraCmdFormPollCmdBuf(SIO_PARAM_SERIAL_DEF *pPortParam)
if (pPortParam->SendCmdFlag && (pPortParam->RevCmdFlag == 0))
{
//pPortParam->RetryTimeCnt++;
strcpy(szbuf, "1-send");
DebugLog(0, szbuf, 'E');
if ((lctime - pPortParam->RetryTimeCnt > 3 * pPortParam->RetryTime) || (lctime - pPortParam->RetryTimeCnt < 0))
{
pPortParam->RetryTimeCnt = lctime;
@ -3151,6 +3160,8 @@ void SendCameraCmdFormPollCmdBuf(SIO_PARAM_SERIAL_DEF *pPortParam)
if (pPortParam->SendCmdFlag && pPortParam->RevCmdFlag)
{
strcpy(szbuf, "2-send");
DebugLog(0, szbuf, 'E');
// 清除当前命令
ClearCameraCmdFormPollCmdBuf(pPortParam);
}

Loading…
Cancel
Save