From 005bb9cfee04cccc27a5364a4187bca7df371448 Mon Sep 17 00:00:00 2001 From: zhaohe Date: Tue, 12 Mar 2024 16:12:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Drelease=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E4=B8=8B=E4=B8=B2=E5=8F=A3=E6=8E=A5=E6=94=B6=E4=B8=8D=E5=88=B0?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/camera_light_src_timing_controller/qt_serial_datachannel.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/camera_light_src_timing_controller/qt_serial_datachannel.cpp b/src/camera_light_src_timing_controller/qt_serial_datachannel.cpp index d92c0fb..b5e86da 100644 --- a/src/camera_light_src_timing_controller/qt_serial_datachannel.cpp +++ b/src/camera_light_src_timing_controller/qt_serial_datachannel.cpp @@ -25,8 +25,10 @@ void QTDataChannel::init() { // ZLOGI(TAG, "rx %d bytes", rx_cnt); if (m_rxcb) m_rxcb(rx, rx_cnt); } + this_thread::sleep_for(chrono::microseconds(100)); + } else { + this_thread::sleep_for(chrono::microseconds(10000)); } - // this_thread::sleep_for(chrono::microseconds(1000)); } })); } @@ -137,8 +139,8 @@ int QTDataChannel::com_receive(uint8_t *rxbuf, int rxbufsize) { COMMTIMEOUTS TimeOuts; GetCommTimeouts(m_CommHandler, &TimeOuts); TimeOuts.ReadIntervalTimeout = 0; // 读间隔超时 - TimeOuts.ReadTotalTimeoutMultiplier = 0; // 读时间系数 - TimeOuts.ReadTotalTimeoutConstant = 1; // 读时间常量 + TimeOuts.ReadTotalTimeoutMultiplier = 0; // 读时间系数 + TimeOuts.ReadTotalTimeoutConstant = 1; // 读时间常量 SetCommTimeouts(m_CommHandler, &TimeOuts); // PurgeComm(m_CommHandler, PURGE_RXCLEAR);