From 2100672fbb7b7584f2f77affa66144c981048a09 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E8=83=A1=E4=BC=A0=E5=86=9B?= <1224667075@qq.com> Date: Tue, 11 Jun 2024 03:52:38 +0000 Subject: [PATCH] Merge #252 into sdk602patch0521 from refs/changes/252/head MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Code review from 胡传军 * refs/changes/252/head: (5 commits squashed) - 获取N天前日期 - 增加传输中UI - 增加OTA传输中的进度条 - Merge branch 'sdk602patch0521' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into sdk602patch0521 - 修复闹钟取消后依然会响的bug Signed-off-by: aliyun8003852482 <1224667075@qq.com> Reviewed-by: snickersun@163.com Merged-by: snickersun@163.com CR-link: https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230/change/252 --- .../alarmclockmanage/src/AlarmClockManage.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/code/sdk/application/wearable/fd230app/nativeui/alarmclockmanage/src/AlarmClockManage.cpp b/code/sdk/application/wearable/fd230app/nativeui/alarmclockmanage/src/AlarmClockManage.cpp index 8d03ec00c..86cfbd3eb 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/alarmclockmanage/src/AlarmClockManage.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/alarmclockmanage/src/AlarmClockManage.cpp @@ -372,13 +372,16 @@ static int32 SetFirstAlarmToday(FirstAlarmTodaySetType type) std::list< AlarmClockInfoToday>::iterator node; std::list< AlarmClockInfoToday>::iterator tempNode; - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "SetFirstAlarmToday !!"); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SetFirstAlarmToday !!"); if (AlarmGetCurrentTimeInfo(&curTime) != 0) { WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "SetFirstAlarmToday AlarmGetCurrentTimeInfo failed!!"); return STATUS_TIME_FUN_ERROR; } + + SetAlarm(ALARM_A, 0,255, 255); - for (node = g_alarmTodayList.begin(); node != g_alarmTodayList.end();) { + for (node = g_alarmTodayList.begin(); node != g_alarmTodayList.end();) + { tempNode = node; tempNode++; if (tempType == TYPE_CUR_NODE_SKIP) { // 第一个闹钟如果已响应直接跳过并删除,有连续相同闹铃时间则连续跳过并删除 @@ -391,17 +394,18 @@ static int32 SetFirstAlarmToday(FirstAlarmTodaySetType type) continue; } - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "alarmTime : %lx!!", node->alarmTime); - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "curTime: hour %ld, min %ld!!", curTime.tm_hour, curTime.tm_min); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "alarmTime : %lx!!", node->alarmTime); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "curTime: hour %ld, min %ld!!", curTime.tm_hour, curTime.tm_min); if (((node->alarmTime >> TWO_BYTES_BITS == (uint32)curTime.tm_hour) && ((node->alarmTime & AND_FOR_LOW_TWO_BYTES) > (uint32)curTime.tm_min)) || node->alarmTime >> TWO_BYTES_BITS > (uint32)curTime.tm_hour) { - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "alarmTime > curTime!!"); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "alarmTime > curTime!!"); SetAlarm(ALARM_A, 0, node->alarmTime >> TWO_BYTES_BITS, node->alarmTime & AND_FOR_LOW_TWO_BYTES); break; } else { // 已过期的直接删除 - WEARABLE_LOGD(WEARABLE_LOG_MODULE_APP, "alarmTime <= curTime!!"); + WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "alarmTime <= curTime!!"); + g_alarmTodayList.erase(node); } node++; -- 2.17.1