From fd82c89afef671665c3a01be05edcce954061fb7 Mon Sep 17 00:00:00 2001 From: penglei <1624952103@qq.com> Date: Sat, 28 Sep 2024 20:24:53 +0800 Subject: [PATCH] =?utf8?q?=E4=BC=98=E5=8C=96=E9=A9=AC=E8=BE=BE=E9=9C=87?= =?utf8?q?=E5=8A=A8=20=E4=BC=98=E5=8C=96=E9=BB=91=E6=9B=9C=E8=A1=A8?= =?utf8?q?=E7=9B=98=E5=A4=A9=E6=B0=94=E5=9B=BE=E6=A0=87=E6=98=BE=E7=A4=BA?= =?utf8?q?=E4=BB=A5=E5=8F=8A=E8=B7=B3=E8=BD=ACAPPVIEW?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativelauncher/include/AppViewIDs.h | 17 +++++++++++------ .../nativeui/weather/src/WeatherModel.cpp | 15 ++++++++++++--- .../vibrator/service/vibrator_service.cpp | 15 ++++++++------- .../instance/114/obsidianrhythm.xml | 4 ++-- 4 files changed, 33 insertions(+), 18 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativelauncher/include/AppViewIDs.h b/code/sdk/application/wearable/fd230app/nativelauncher/include/AppViewIDs.h index eb8881a57..3347c9d89 100644 --- a/code/sdk/application/wearable/fd230app/nativelauncher/include/AppViewIDs.h +++ b/code/sdk/application/wearable/fd230app/nativelauncher/include/AppViewIDs.h @@ -40,7 +40,6 @@ typedef enum : uint16_t VIEW_INCOMING_CALL, // 来电界面 VIEW_COMPASS, // 指南针界面 VIEW_CONNECT_PHONE, // 连接手机界面 - VIEW_WEATHER, // 天气 VIEW_SYSTEM, // 系统 VIEW_SOUND_VIBRATION, // 声音与震动 VIEW_SYSTEM_VOLUME, // 系统音量 @@ -64,7 +63,8 @@ typedef enum : uint16_t VIEW_THEME_STYLE, // 主题样式 VIEW_AI_VOICE, // AI Voice(人工智能语音) VIEW_AI_MODELS, // AI模型选择界面 - VIEW_REBOOTANDSHUTDOWN, //(关机或重启界面) + VIEW_SHUTDOWN_OR_REBOOT, + VIEW_REBOOTANDSHUTDOWN, //(关机或重启界面) VIEW_RECORD, VIEW_MUSIC_PLAYER, // 音乐播放器 /* -------------------------------------------------------------------------- */ @@ -118,7 +118,6 @@ typedef enum : uint16_t VIEW_MAIN_PHONE, // 主电话Slice VIEW_DIALING_METHOD, // 拨号方式 VIEW_TEST, // 测试 - VIEW_GOAL, // 每日目标 VIEW_CALCULATOR, // 计算器 VIEW_SCHEDULE, // schedule VIEW_SLEEPMODE, // sleep mode @@ -135,9 +134,15 @@ typedef enum : uint16_t #ifdef SUPPORT_ALIPAY_SEC VIEW_MAIN_ALIPAY, #endif - /*请在最末添加新的viewID*/ - VIEW_CALENDAR, //日历 - VIEW_SAFE_MODE, // 安全模式 + VIEW_CALENDAR, // 日历 + VIEW_SAFE_MODE, // 安全模式 + + /*表盘功能相关VIEW_ID 请勿移动 请勿在下方增加slice*/ + VIEW_DIAL_FUN_ID = 200, + VIEW_GOAL, // 每日目标 + VIEW_WEATHER, // 天气 + VIEW_ADD_NEW_ID = 250, + /* -------------------------------------------------------------------------- */ VIEW_MAX_INTER_APP, // 在此之前添加native应用ID. VIEW_EXTERN_APP = 0xFFFE, // 三方应用 VIEW_INVALIDE_APP = 0xFFFF, diff --git a/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherModel.cpp b/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherModel.cpp index 7a5412b0e..72ba78208 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherModel.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherModel.cpp @@ -1,8 +1,8 @@ /* * @Author: luozheng 1732036298@qq.com * @Date: 2024-04-08 18:40:09 - * @LastEditors: luozheng 1732036298@qq.com - * @LastEditTime: 2024-09-13 10:43:56 + * @LastEditors: penglei 1624952103@qq.com + * @LastEditTime: 2024-09-28 17:27:46 * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/weather/src/WeatherModel.cpp */ #include "weather/include/WeatherModel.h" @@ -345,7 +345,16 @@ namespace OHOS } if (DialModelWeather::GetInstance()) { - DialModelWeather::GetInstance()->UpdateWeather(Weather_data_seven_data[0].iconDay); // 更新主界面天气图标 + int index; + if(IsNightTime()) + { + index = Weather_data_t_now.iconNight; // 夜晚天气图标 + } + else + { + index = Weather_data_seven_data[0].iconDay; //白天天气图标 + } + DialModelWeather::GetInstance()->UpdateWeather(index); // 更新主界面天气图标 // const std::string str = GetWeatherTemperature() + " "+GetWeatherDescription(); const std::string str = GetWeatherTemperature(); DialModelWeatherStr::GetInstance()->UpdateWeatherStr(str); diff --git a/code/sdk/drivers/peripheral/vibrator/service/vibrator_service.cpp b/code/sdk/drivers/peripheral/vibrator/service/vibrator_service.cpp index 631d2407f..70c173413 100644 --- a/code/sdk/drivers/peripheral/vibrator/service/vibrator_service.cpp +++ b/code/sdk/drivers/peripheral/vibrator/service/vibrator_service.cpp @@ -2,7 +2,7 @@ * @Author: penglei 1624952103@qq.com * @Date: 2024-08-08 16:33:23 * @LastEditors: penglei 1624952103@qq.com - * @LastEditTime: 2024-08-08 16:43:33 + * @LastEditTime: 2024-09-28 20:17:37 * @FilePath: /FD230/code/sdk/drivers/peripheral/vibrator/service/vibrator_service.cpp * @Description: * @@ -78,22 +78,23 @@ void custom_VibratorFunc_int(int vibratorType) break; case 3: mail.cycle_time_ms = 235; - mail.duty = 65; - mail.duration_time_ms = 100; + mail.duty = 50; + mail.duration_time_ms = 60; break; case 2: mail.cycle_time_ms = 235; - mail.duty = 40; - mail.duration_time_ms = 100; + mail.duty = 50; + mail.duration_time_ms = 40; break; case 1: mail.cycle_time_ms = 235; - mail.duty = 20; - mail.duration_time_ms = 100; + mail.duty = 50; + mail.duration_time_ms = 20; break; default: break; } + // PRINT("cycle_time_ms[%d], duty[%d], duration_time_ms[%d] \n",mail.cycle_time_ms,mail.duty,mail.duration_time_ms); do_vibrator_cmd(mail); } diff --git a/tools/dial_converter_tool/instance/114/obsidianrhythm.xml b/tools/dial_converter_tool/instance/114/obsidianrhythm.xml index 2cf759eb4..d76ed4925 100644 --- a/tools/dial_converter_tool/instance/114/obsidianrhythm.xml +++ b/tools/dial_converter_tool/instance/114/obsidianrhythm.xml @@ -75,10 +75,10 @@ --> - + - + -- 2.17.1