From 54e35bce2c0db6d24c5087d0a0c74d3b83d75f9b Mon Sep 17 00:00:00 2001 From: Matthew Date: Wed, 26 Feb 2025 21:14:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BD=91=E7=BB=9C=E6=91=84?= =?UTF-8?q?=E5=83=8F=E5=A4=B4=E7=94=B5=E6=BA=90=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/GPIOControl.h | 6 +++--- app/src/main/cpp/PhoneDevice.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/cpp/GPIOControl.h b/app/src/main/cpp/GPIOControl.h index 442b1544..c46a174d 100644 --- a/app/src/main/cpp/GPIOControl.h +++ b/app/src/main/cpp/GPIOControl.h @@ -539,13 +539,13 @@ class NetCameraPowerCtrl : public PowerControl public: NetCameraPowerCtrl(uint32_t closeDelayTime) : #ifdef USING_N938 - PowerControl(CMD_SET_OTG_STATE, CMD_SET_NETWORK_POWER_EN, CMD_SET_PIC1_POWER, CMD_SET_485_EN_STATE, closeDelayTime) + PowerControl(CMD_SET_NETWORK_POWER_EN, CMD_SET_PIC1_POWER, CMD_SET_485_EN_STATE, closeDelayTime) #else // USING_N938 #ifdef USING_PLZ - PowerControl(CMD_SET_OTG_STATE, CMD_SET_100M_ENABLE, CMD_SET_100M_SWITCH_PWR_ENABLE, CMD_SET_12V_EN_STATE, closeDelayTime) + PowerControl(CMD_SET_12V_EN_STATE, closeDelayTime) #else // USING_PLZ // MicroPhoto - PowerControl(CMD_SET_OTG_STATE, CMD_SET_12V_EN_STATE, CMD_SET_485_EN_STATE, closeDelayTime) + PowerControl(CMD_SET_12V_EN_STATE, closeDelayTime) #endif // USING_PLZ #endif // USING_N938 { diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index 6c310754..8ebaf19d 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -1534,12 +1534,8 @@ bool CPhoneDevice::TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c XYLOG(XYLOG_SEVERITY_DEBUG, "Ethernet Power ON"); std::shared_ptr ethernetPowerCtrl = std::make_shared(1); - std::this_thread::sleep_for(std::chrono::milliseconds(1000)); - SetStaticIp(); - std::this_thread::sleep_for(std::chrono::milliseconds(256)); net_handle_t netHandle = GetEthnetHandle(); - if (netHandle == 0) { // Wait about 10s @@ -1566,6 +1562,10 @@ bool CPhoneDevice::TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c { XYLOG(XYLOG_SEVERITY_INFO, "Ethernet is Available CH=%u PR=%X PHOTOID=%u", (uint32_t)localPhotoInfo.channel, (uint32_t)localPhotoInfo.preset, localPhotoInfo.photoId); } + + SetStaticIp(); + std::this_thread::sleep_for(std::chrono::milliseconds(256)); + NET_PHOTO_INFO netPhotoInfo = { netHandle, 0 }; if (localPhotoInfo.vendor == 1) {