From 6d25dc7a76055f6ee0c3b338bdbe5683c81f556e Mon Sep 17 00:00:00 2001 From: penglei <1624952103@qq.com> Date: Sat, 16 Nov 2024 10:45:54 +0800 Subject: [PATCH] =?utf8?q?=E4=BC=98=E5=8C=96cat1=E4=BA=A7=E6=B5=8B?= =?utf8?q?=E7=95=8C=E9=9D=A2=E5=88=B7=E6=96=B0=EF=BC=8C=E4=BC=98=E5=8C=96?= =?utf8?q?=E7=94=B5=E9=87=8F=E5=AD=98=E5=82=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- code/sdk/application/battery/service/battery_service.cpp | 4 ---- .../fd230app/nativeui/producttest/src/testcat1.cpp | 8 ++++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/code/sdk/application/battery/service/battery_service.cpp b/code/sdk/application/battery/service/battery_service.cpp index d7499366f..0cf34f75e 100644 --- a/code/sdk/application/battery/service/battery_service.cpp +++ b/code/sdk/application/battery/service/battery_service.cpp @@ -159,10 +159,6 @@ static void battery_save_percent(void) { float voltage; uint8_t percent = batteryservice_get_voltage(&voltage); - if(!percent) - { - return; - } uapi_save_file_data("/user/userdata/battery.bin",&percent,1,"wb"); PRINT("battery_save_percent : %d",percent); } diff --git a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testcat1.cpp b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testcat1.cpp index 91898dab2..2fd939fcc 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testcat1.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/producttest/src/testcat1.cpp @@ -182,6 +182,7 @@ namespace OHOS static void mgdataTimerCallBack(int data) { + cat1_at_cmd("at*mrd_cdf=Q,LteCalData.nvm"); cat1_getsignal(); cat1_getver(); OHOS::testcat1View *pview = OHOS::testcat1View::GetInstance(); @@ -190,14 +191,13 @@ namespace OHOS msgver.cat1appver = uapi_dev_runtime_get_cat1_pyver(); msgver.modem_version = uapi_dev_runtime_get_cat1_modemver(); - ble_get_cat1_at_msg(msgver.calibration,1); - OHOS::testcat1View::cat1_msg msg={0}; msg.imei = uapi_dev_runtime_get_cat1_imei(); msg.sim = uapi_dev_runtime_get_cat1_simstat(); msg.signal = uapi_dev_runtime_get_cat1_signal(); msg.oper = uapi_dev_runtime_get_cat1_operator(); - + ble_get_cat1_at_msg(msgver.calibration,1); + if(pview !=NULL) { pview->setcat1vermsg(msgver); @@ -341,7 +341,7 @@ namespace OHOS uint32_t tick; osStatus_t retTimer; Gsenson_TEST_timer = osTimerNew((osTimerFunc_t)mgdataTimerCallBack, osTimerPeriodic, NULL, NULL); - tick =3000;// osMs2Tick(1000); + tick =2000;// osMs2Tick(1000); retTimer = osTimerStart(Gsenson_TEST_timer, tick); if (retTimer != osOK && Gsenson_TEST_timer != NULL) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"StartCallTimer osTimerStart failed, ret = %lx!!", retTimer); -- 2.17.1