From 9d1c3afc189fcfe7e4f62caeca6fd34b13f328be Mon Sep 17 00:00:00 2001 From: SnickerSun Date: Sat, 27 Apr 2024 19:54:14 +0800 Subject: [PATCH] =?utf8?q?=E4=BA=A7=E6=B5=8B=E4=B8=AD=E6=B7=BB=E5=8A=A0?= =?utf8?q?=E5=85=B3=E9=97=AD=E8=93=9D=E7=89=99cat1=E8=BF=9B=E8=A1=8C?= =?utf8?q?=E7=9D=A1=E7=9C=A0=E7=94=B5=E6=B5=81=E6=B5=8B=E8=AF=95=E7=9A=84?= =?utf8?q?=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../producttest/include/testPresenter.h | 1 + .../producttest/src/testPresenter.cpp | 12 +++++++++- .../nativeui/producttest/src/testView.cpp | 1 + .../drivers/peripheral/utils/custom_utils.c | 22 ++++++++++++++++++- .../drivers/peripheral/utils/custom_utils.h | 6 ++++- 5 files changed, 39 insertions(+), 3 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/producttest/include/testPresenter.h b/code/sdk/application/wearable/fd230app/nativeui/producttest/include/testPresenter.h index f9d538c99..c79d6a1f6 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/producttest/include/testPresenter.h +++ b/code/sdk/application/wearable/fd230app/nativeui/producttest/include/testPresenter.h @@ -35,6 +35,7 @@ namespace OHOS HRSENSON, GSENSON, OLDTEST, + DEEPSLEEP, shutdown, TEST_1, diff --git a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testPresenter.cpp index b71341d60..65ea32f5a 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testPresenter.cpp @@ -52,6 +52,7 @@ namespace OHOS {HRSENSON,"hrsensonbutton", "gsensonbutton_next",true}, {GSENSON,"gsensonbutton","xxxx" ,true}, {OLDTEST,"oldtestbutton","oldtestexit",true}, + {DEEPSLEEP,"deepsleep","xxxxxxxxx",true}, {shutdown,"shutdown","xxxxxxxxx",true}, }; // {FACTORYRESETVIEW,"FactoryResetButton",true}, @@ -199,7 +200,16 @@ namespace OHOS { uapi_poweroff_device(); } - + if(strcmp(view.GetViewId(),"deepsleep") == 0) + { + //TODO: close bt and cat1 , then deepsleep + stop_custom_ble_service(); + LOS_Msleep(50); + uapi_set4GCapability(false); + LOS_Msleep(50); + mcu_pm_lcd_off(NULL,NULL); + return true; + } for(int i=0;i