From 093fbbb1ed0092f276093c170cd46ac8e10ab443 Mon Sep 17 00:00:00 2001 From: Fancy code <258828110.@qq.com> Date: Wed, 29 May 2024 10:59:21 +0800 Subject: [PATCH] Improve:key check function. --- hal/include/IHalCpp.h | 2 +- middleware/McuManager/src/McuManagerImpl.cpp | 1 + utils/KeyControl/include/KeyControl.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hal/include/IHalCpp.h b/hal/include/IHalCpp.h index f1095d4..ffd3ad4 100644 --- a/hal/include/IHalCpp.h +++ b/hal/include/IHalCpp.h @@ -22,7 +22,7 @@ using VirtualLedState = unsigned char; using VirtualKeyEvent = unsigned char; constexpr int INVALID_PERIOD = -1; -constexpr int PERIPHERAL_CHECK_PERIOD_MS = 100; +constexpr int PERIPHERAL_CHECK_PERIOD_MS = 50; constexpr int IMEI_LEN = 15; enum class CameraType { diff --git a/middleware/McuManager/src/McuManagerImpl.cpp b/middleware/McuManager/src/McuManagerImpl.cpp index a10324d..c9bfbdc 100644 --- a/middleware/McuManager/src/McuManagerImpl.cpp +++ b/middleware/McuManager/src/McuManagerImpl.cpp @@ -53,6 +53,7 @@ const StatusCode McuManagerImpl::Init(void) auto watchThread = [](std::shared_ptr mcuManager) { LogInfo("mWatchDogThread started.\n"); mcuManager->WatchDogThread(); + LogWarning("mWatchDogThread stop.\n"); }; mWatchDogThread = std::thread(watchThread, shared_from_this()); return CreateStatusCode(STATUS_CODE_OK); diff --git a/utils/KeyControl/include/KeyControl.h b/utils/KeyControl/include/KeyControl.h index 1676537..24c50f4 100644 --- a/utils/KeyControl/include/KeyControl.h +++ b/utils/KeyControl/include/KeyControl.h @@ -17,7 +17,7 @@ #include #include #include -constexpr int KEY_ACTION_SHORT_CLICK = 200; +constexpr int KEY_ACTION_SHORT_CLICK = 100; constexpr int KEY_ACTION_HOLD_DWON = 500; constexpr long int KEY_NOT_PRESSING = -1; enum class KeyHalEvent