* @Author: luozheng 1732036298@qq.com
* @Date: 2024-06-20 15:14:43
* @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-10-16 18:26:13
+ * @LastEditTime: 2024-12-05 15:06:19
* @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/aivoice/include/AiVoiceModel.h
*/
#ifndef AI_VOICE_MODEL_H
void ai_start_screen60s_timer(uint32_t interval = 30*1000);
void ai_stop_screen60s_timer(void);
void reset_ai_screen60s_timer_time();
+ bool get_screen60s_timer_is_stop(void);
void start_listening_timer(uint32_t interval = 1000);
void stop_listening_timer(void);
* @Author: luozheng 1732036298@qq.com
* @Date: 2024-06-20 15:14:50
* @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-11-05 11:16:39
+ * @LastEditTime: 2024-12-05 15:04:21
* @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp
*/
#include "aivoice/include/AiVoiceModel.h"
}
}
+ bool AiVoiceModel::get_screen60s_timer_is_stop(void)
+ {
+ if(g_screen60s_timer == nullptr)
+ return true;
+ else
+ return false;
+ }
static osTimerId_t g_listeningEndHandle = nullptr;
static int8_t LISTENING_TIMEOUT = 10; // 10s钟无操作关闭该视图
static void AIListeningCallbackProc(int data)
/*
* @Author: luozheng 1732036298@qq.com
* @Date: 2024-03-25 17:33:47
- * @LastEditors: penglei 1624952103@qq.com
- * @LastEditTime: 2024-11-27 10:53:09
+ * @LastEditors: luozheng 1732036298@qq.com
+ * @LastEditTime: 2024-12-05 15:18:11
* @FilePath: /FD230/code/sdk/application/wearable/service/msg_center/src/notify/findwatch_notification.cpp
* @details:实现查找手表的功能一般需要手表和智能手机之间的配合,通常是通过手机上的应用(App)或其他设备发送指令给手表,触发手表的查找功能。
* 以下是基本的实现步骤:
#include "vibrator_service.h"
#include "../../../../../../../drivers/peripheral/utils/custom_runtime.h"
#include <custom_utils.h>
+#include "aivoice/include/AiVoiceModel.h"
namespace OHOS
{
FindWatchViewEventListener::GetInstance().FindWatchRingPlayStop();
FindWatchViewEventListener::GetInstance().ResumeScreenBrightness();
FindWatchViewEventListener::GetInstance().FindWatch_StopTimer();
- ScreenAlwaysOnCtr(CANCEL_SCREEN_ALWAYS_ON);
+ if(OHOS::AiVoiceModel::GetInstance().get_screen60s_timer_is_stop()) //如果在AI界面查找手表且60s的常亮屏定时器不在,可以取消常亮屏
+ {
+ ScreenAlwaysOnCtr(CANCEL_SCREEN_ALWAYS_ON);
+ }
}
/* ----------------------- FindWatchRingPlayerListener ---------------------- */