diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index 20e2af11..cb5e7013 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -1706,7 +1706,7 @@ bool CPhoneDevice::TakePhoto(const IDevice::PHOTO_INFO& photoInfo, const vector< OpenPTZSensors(photoInfo.selfTestingTime); } CameraPhotoCmd(ts, photoInfo.channel, 0, photoInfo.resolution, 0); - XYLOG(XYLOG_SEVERITY_INFO, "Takeing photo over"); + XYLOG(XYLOG_SEVERITY_INFO, "Taking photo over"); res = TakePTZPhotoCb(3, photoInfo); } else if (mPhotoInfo.usingSysCamera == 1) diff --git a/app/src/main/cpp/SensorsProtocol.cpp b/app/src/main/cpp/SensorsProtocol.cpp index 70147713..9df8091e 100644 --- a/app/src/main/cpp/SensorsProtocol.cpp +++ b/app/src/main/cpp/SensorsProtocol.cpp @@ -695,6 +695,7 @@ void Gm_OpenSerialPort(int devidx) sprintf(szbuf, "装置%d 打开串口%d %s成功!fd=%d", devidx + 1, devparam[devidx].commid + 1, devparam[devidx].pathname, fd); DebugLog(devparam[devidx].commid, szbuf, 'I'); serialport[devparam[devidx].commid].fd = fd; + Gm_SetSerialPortParam(devparam[devidx].commid); return; } sprintf(szbuf, "装置%d 串口%d %s已经打开!fd=%d", devidx + 1, devparam[devidx].commid + 1, devparam[devidx].pathname, serialport[devparam[devidx].commid].fd); @@ -2220,9 +2221,9 @@ void SendCmdFormPollCmdBuf(int port) serialport[devparam[srdt.curdevidx[port]].commid].m_iRevStatus = 0; if (serialport[port].fd < 0) return; - ret = Gm_SetSerialPortParam(port); - if (ret < 0) - return; + //ret = Gm_SetSerialPortParam(port); + //if (ret < 0) + // return; len = GM_SerialComSend(&pPortParam->PollCmd[2], pPortParam->cmdlen - 2, port); if (len < 1) { @@ -2751,7 +2752,7 @@ void Gm_SendPelco_pCommand(uint32_t cmdtype) commandbuf[len] = (uint8_t)Gm_Pelco_pXORCheck(commandbuf, len); len++; serialport[srdt.camerauseserial].cmdlen = len; - Gm_SetSerialPortParam(srdt.camerauseserial); + //Gm_SetSerialPortParam(srdt.camerauseserial); //unsigned char sendbuf[] = {0x68,0x00,0x00,0x68,0x0ff,0x02,0x01,0x16}; //len = GM_SerialComSend(sendbuf, sizeof(sendbuf), srdt.camerauseserial); @@ -2803,7 +2804,7 @@ void Gm_SendPelco_DCommand(uint32_t cmdtype) #endif len++; serialport[srdt.camerauseserial].cmdlen = len; - Gm_SetSerialPortParam(srdt.camerauseserial); + //Gm_SetSerialPortParam(srdt.camerauseserial); len = GM_SerialComSend(commandbuf, len, srdt.camerauseserial); if (len < 1) {