From 78ceadc24ea1fa0aeef4d4b1789fd8e622214d59 Mon Sep 17 00:00:00 2001 From: "XI.CHEN" <2311041011@qq.com> Date: Wed, 11 Dec 2024 13:45:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=93=E5=BC=80=E7=94=B5?= =?UTF-8?q?=E6=BA=90=E5=BB=B6=E6=97=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/GPIOControl.cpp | 1 + app/src/main/cpp/PhoneDevice.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/cpp/GPIOControl.cpp b/app/src/main/cpp/GPIOControl.cpp index f605adf0..3ff387a8 100644 --- a/app/src/main/cpp/GPIOControl.cpp +++ b/app/src/main/cpp/GPIOControl.cpp @@ -60,6 +60,7 @@ size_t GpioControl::turnOnImpl(const IOT_PARAM& param) #ifdef _DEBUG ALOGI("PWR TurnOn cmd=%d,result=%d ref=%u\r\n",param.cmd, param.result, (uint32_t)references); #endif + std::this_thread::sleep_for(std::chrono::milliseconds(100)); return references; } diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index 3a92ef3c..16a81573 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -3757,8 +3757,8 @@ bool CPhoneDevice::OpenSensors(int sensortype) { if(sensortype == MAIN_POWER_OPEN) { GpioControl::set12VEnable(true); - GpioControl::setCam3V3Enable(true); GpioControl::setRS485Enable(true); + GpioControl::setCam3V3Enable(true); GpioControl::TurnOn(CMD_SET_SPI_POWER); // GpioControl::TurnOn(CMD_SET_485_EN_STATE); // 打开RS485电源 #ifndef USING_N938 @@ -3820,10 +3820,10 @@ bool CPhoneDevice::CloseSensors(int sensortype) { if(sensortype == MAIN_POWER_OPEN) { - GpioControl::TurnOff(CMD_SET_SPI_POWER); GpioControl::set12VEnable(false); - GpioControl::setCam3V3Enable(false); GpioControl::setRS485Enable(false); + GpioControl::setCam3V3Enable(false); + GpioControl::TurnOff(CMD_SET_SPI_POWER); // GpioControl::TurnOff(CMD_SET_485_EN_STATE); #ifndef USING_N938 #ifndef USING_PLZ