From 5ea546de1fd5b2df5410069a15797e13834322ce Mon Sep 17 00:00:00 2001 From: penglei <1624952103@qq.com> Date: Mon, 1 Sep 2025 15:29:48 +0800 Subject: [PATCH] =?utf8?q?=E4=BC=98=E5=8C=96=E4=BA=A7=E6=B5=8BUI=E4=BD=8E?= =?utf8?q?=E5=8A=9F=E8=80=97=E6=B5=8B=E8=AF=95=EF=BC=8C=E4=BC=98=E5=8C=962?= =?utf8?q?30=EF=BC=8Cn9=E5=BD=95=E9=9F=B3=E9=9F=B3=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../src/AlarmClockTimerConfig.cpp | 10 +++++----- .../brandy/primary/primary_sub_port_in.c | 20 ++++++++++++++----- .../UI/producttest/include/testPresenter.h | 4 ++-- .../UI/producttest/src/testPresenter.cpp | 18 ++++++++++++++++- .../zhihui/UI/producttest/src/testView.cpp | 14 ++++++------- code/sdk/zhihui/utils/custom_utils.c | 2 -- 6 files changed, 46 insertions(+), 22 deletions(-) diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp index a4140dbc7..d0dffed00 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/alarmclocktimerconfig/src/AlarmClockTimerConfig.cpp @@ -376,11 +376,6 @@ extern "C" #endif } - if (curTime.tm_min % 60 == 0 && curTime.tm_sec == 0) - { - do_custom_fileoperate_service_check_msg(CUSTOM_FILEOPERATE_MSG_TYPE_BATTERY_DATA_SAVE, nullptr, 0); // 十分钟存一次电池信息 - } - if (g_alarmCtrA.state == ALARM_STATUS_RUNNING) { WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "Checking Alarm A"); @@ -432,6 +427,11 @@ extern "C" return; } + if (curTime.tm_min % 60 == 0 && curTime.tm_sec == 0) + { + do_custom_fileoperate_service_check_msg(CUSTOM_FILEOPERATE_MSG_TYPE_BATTERY_DATA_SAVE, nullptr, 0); // 十分钟存一次电池信息 + } + HandleAlarmOnTime(&curTime); HandleSleepReminder(&curTime); HandleMusicUpdate(); diff --git a/code/sdk/middleware/services/media/hal/audio/plugins/brandy/primary/primary_sub_port_in.c b/code/sdk/middleware/services/media/hal/audio/plugins/brandy/primary/primary_sub_port_in.c index 46071d455..017b4cea1 100644 --- a/code/sdk/middleware/services/media/hal/audio/plugins/brandy/primary/primary_sub_port_in.c +++ b/code/sdk/middleware/services/media/hal/audio/plugins/brandy/primary/primary_sub_port_in.c @@ -100,7 +100,7 @@ static SubPortTrackInCapabilities g_caps[] = { { AUDIO_IN_COMMUNICATION, AUDIO_FORMAT_AMR_WB, 16000, 1 }, { AUDIO_IN_COMMUNICATION, AUDIO_FORMAT_PCM_16_BIT, 8000, 1}, { AUDIO_IN_COMMUNICATION, AUDIO_FORMAT_PCM_16_BIT, 16000, 1}, - { AUDIO_IN_COMMUNICATION, AUDIO_FORMAT_OPUS, 16000, 1 }, + { AUDIO_IN_COMMUNICATION, AUDIO_FORMAT_OPUS, 16000, 1 }, { AUDIO_IN_COMMUNICATION, AUDIO_FORMAT_MP3, 16000, 1 }, }; @@ -191,6 +191,16 @@ static int32_t AIDevOpen(td_handle *aiHandle, enum AudioCategory audioCategory) MediaHalMutexUnLock(g_subPortTrackInLock); return ret; } + uapi_ai_gain gain = {}; + MEDIA_HAL_DOFUNC_TIME(ret = uapi_ai_get_volume(*aiHandle, &gain)); + CHK_FAILED_RETURN(ret, MEDIA_HAL_OK, ret, "uapi_ai_get_volume failed"); +#ifdef BOARD_FD230 + gain.integer = gain.integer - 9; // 前端mic灵敏度不同可通过此处调增,增加4db增益 默认gain.integer = gain.integer+4 +#elif defined(BORAD_N9) || defined(BORAD_W9) + gain.integer = gain.integer + 10; // 前端mic灵敏度不同可通过此处调增,增加4db增益 默认gain.integer = gain.integer+4 +#endif + MEDIA_HAL_DOFUNC_TIME(ret = uapi_ai_set_volume(*aiHandle, &gain)); + CHK_FAILED_RETURN(ret, MEDIA_HAL_OK, ret, "uapi_ai_set_volume failed"); g_subPortTrackInOpened = true; } @@ -258,9 +268,9 @@ static int32_t AudioSDKOpenInternal(SubPortTrackInContext *portTrackInCtx) if (aencCodecId == UAPI_ACODEC_ID_MP3) { aencAttr.param.private_data = &bitRate; aencAttr.param.private_data_size = sizeof(bitRate); - } else { + } else { aencAttr.param.private_data = NULL; - aencAttr.param.private_data_size = 0; + aencAttr.param.private_data_size = 0; } ret = AudioSDKAencOpen(&portTrackInCtx->aencHandle, aencAttr); if (ret != MEDIA_HAL_OK) { @@ -656,11 +666,11 @@ static int32_t PrimarySetSeaEnable(AudioHandle trackHandle, char *value, uint32_ { SubPortTrackInContext *portTrackInCtx = (SubPortTrackInContext *)trackHandle; CHK_NULL_RETURN(value, MEDIA_HAL_INVALID_PARAM, "input param value is null"); -#ifdef MELODY_AUDIO_SUPPORT +#ifdef MELODY_AUDIO_SUPPORT if (!portTrackInCtx->isNeedOpenSea) { MEDIA_HAL_LOGE(MODULE_NAME, "the sea is not open. can not set sea options!"); return MEDIA_HAL_ERR; - } + } #endif return SetSeaEnable(portTrackInCtx->seaHandle, value, valueLen); } diff --git a/code/sdk/zhihui/UI/producttest/include/testPresenter.h b/code/sdk/zhihui/UI/producttest/include/testPresenter.h index 1ff73a05d..55fc6f4da 100644 --- a/code/sdk/zhihui/UI/producttest/include/testPresenter.h +++ b/code/sdk/zhihui/UI/producttest/include/testPresenter.h @@ -2,7 +2,7 @@ * @Author: penglei 1624952103@qq.com * @Date: 2024-08-23 10:50:37 * @LastEditors: penglei 1624952103@qq.com - * @LastEditTime: 2025-08-19 09:41:03 + * @LastEditTime: 2025-09-01 09:55:12 * @FilePath: /FD230/code/sdk/application/wearable/fd230/nativeapp/nativeui/producttest/include/testPresenter.h * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE */ @@ -71,7 +71,7 @@ namespace OHOS GSENSON, BTTEST, SEChipTest, - PingTest, + // PingTest, #ifdef SUPPORT_GNSS GPSTEST, diff --git a/code/sdk/zhihui/UI/producttest/src/testPresenter.cpp b/code/sdk/zhihui/UI/producttest/src/testPresenter.cpp index ac60704e1..283da5252 100644 --- a/code/sdk/zhihui/UI/producttest/src/testPresenter.cpp +++ b/code/sdk/zhihui/UI/producttest/src/testPresenter.cpp @@ -364,7 +364,23 @@ namespace OHOS LOS_Msleep(50); uapi_set4GCapability(false); LOS_Msleep(50); - mcu_pm_lcd_off(NULL,NULL); + + uint8_t cnt = pm_veto_get_id_cnt(PM_ID_P_TEST); + if (cnt == 1) { + uapi_pm_remove_sleep_veto(PM_ID_P_TEST); + } else { + // WEARABLE_LOGE(WEARABLE_LOG_MODULE_MAIN_SERVICE,"CAT1 SERVICE MCU has got pm_id_cat1 vote\r\n"); + } + + + // mcu_pm_lcd_off(NULL,NULL); + + const power_display_svr_api_t * display_api = power_display_svr_get_api(); + if (display_api) + { + display_api->turn_off_screen(); + } + return true; } #ifdef SUPPORT_A5133_SERVICE diff --git a/code/sdk/zhihui/UI/producttest/src/testView.cpp b/code/sdk/zhihui/UI/producttest/src/testView.cpp index 9e5900401..1771d5048 100644 --- a/code/sdk/zhihui/UI/producttest/src/testView.cpp +++ b/code/sdk/zhihui/UI/producttest/src/testView.cpp @@ -58,7 +58,7 @@ namespace OHOS {GSENSON, "gsensonbutton", "gsensor", "gsensonbutton_next", &testView::ChangeGTESTView, true}, {BTTEST, "BTbutton", "BT", "BTbutton_next", &testView::ChangeBTTESTView, true}, {SEChipTest, "SEChipTestbutton", "SEChipTest", "SEChipTestbutton_next", &testView::ChangeSEChipTESTView, true}, - {PingTest, "PingTestbutton", "PingTest", "PingTestbutton_next", &testView::ChangePingTESTView, true}, + // {PingTest, "PingTestbutton", "PingTest", "PingTestbutton_next", &testView::ChangePingTESTView, true}, #if defined(SUPPORT_GNSS) {GPSTEST, "GPSTestbutton", "GPSTest", "GPSTestbutton_next", &testView::ChangeGPSTESTView, true}, #endif @@ -1025,12 +1025,12 @@ namespace OHOS test_SEChip_view = nullptr; SystemScrollView[hideView] = nullptr; break; - case PingTest: - group->Remove(SystemScrollView[hideView]); - delete test_Ping_view; - test_Ping_view = nullptr; - SystemScrollView[hideView] = nullptr; - break; + // case PingTest: + // group->Remove(SystemScrollView[hideView]); + // delete test_Ping_view; + // test_Ping_view = nullptr; + // SystemScrollView[hideView] = nullptr; + // break; #if defined(SUPPORT_GNSS) case GPSTEST: group->Remove(SystemScrollView[hideView]); diff --git a/code/sdk/zhihui/utils/custom_utils.c b/code/sdk/zhihui/utils/custom_utils.c index fc5be2ded..54d4f5d77 100644 --- a/code/sdk/zhihui/utils/custom_utils.c +++ b/code/sdk/zhihui/utils/custom_utils.c @@ -1579,8 +1579,6 @@ extern void cat1_api_enable_cat1(bool isopen); //设置4G能力开关是否开启 void uapi_set4GCapability(bool isopen) { - errcode_t ret = 0; - void *tcp_thread_id = NULL; if(isopen) { cat1_api_enable_cat1(true); -- 2.17.1