diff --git a/app/src/main/cpp/SensorsProtocol.cpp b/app/src/main/cpp/SensorsProtocol.cpp index 99a5db3e..beba165d 100644 --- a/app/src/main/cpp/SensorsProtocol.cpp +++ b/app/src/main/cpp/SensorsProtocol.cpp @@ -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,7 +3132,10 @@ void SendCameraCmdFormPollCmdBuf(SIO_PARAM_SERIAL_DEF *pPortParam) if (pPortParam->SendCmdFlag && (pPortParam->RevCmdFlag == 0)) { //pPortParam->RetryTimeCnt++; - if ((lctime - pPortParam->RetryTimeCnt > 3 * pPortParam->RetryTime) || (lctime - pPortParam->RetryTimeCnt < 0)) + strcpy(szbuf, "1-send"); + DebugLog(0, szbuf, 'E'); + + if ((lctime - pPortParam->RetryTimeCnt > 3 * pPortParam->RetryTime) || (lctime - pPortParam->RetryTimeCnt < 0)) { pPortParam->RetryTimeCnt = lctime; return; @@ -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); }