Improve:key check function.
This commit is contained in:
parent
68d1dd58ca
commit
093fbbb1ed
|
@ -22,7 +22,7 @@
|
||||||
using VirtualLedState = unsigned char;
|
using VirtualLedState = unsigned char;
|
||||||
using VirtualKeyEvent = unsigned char;
|
using VirtualKeyEvent = unsigned char;
|
||||||
constexpr int INVALID_PERIOD = -1;
|
constexpr int INVALID_PERIOD = -1;
|
||||||
constexpr int PERIPHERAL_CHECK_PERIOD_MS = 100;
|
constexpr int PERIPHERAL_CHECK_PERIOD_MS = 50;
|
||||||
constexpr int IMEI_LEN = 15;
|
constexpr int IMEI_LEN = 15;
|
||||||
enum class CameraType
|
enum class CameraType
|
||||||
{
|
{
|
||||||
|
|
|
@ -53,6 +53,7 @@ const StatusCode McuManagerImpl::Init(void)
|
||||||
auto watchThread = [](std::shared_ptr<McuManagerImpl> mcuManager) {
|
auto watchThread = [](std::shared_ptr<McuManagerImpl> mcuManager) {
|
||||||
LogInfo("mWatchDogThread started.\n");
|
LogInfo("mWatchDogThread started.\n");
|
||||||
mcuManager->WatchDogThread();
|
mcuManager->WatchDogThread();
|
||||||
|
LogWarning("mWatchDogThread stop.\n");
|
||||||
};
|
};
|
||||||
mWatchDogThread = std::thread(watchThread, shared_from_this());
|
mWatchDogThread = std::thread(watchThread, shared_from_this());
|
||||||
return CreateStatusCode(STATUS_CODE_OK);
|
return CreateStatusCode(STATUS_CODE_OK);
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
constexpr int KEY_ACTION_SHORT_CLICK = 200;
|
constexpr int KEY_ACTION_SHORT_CLICK = 100;
|
||||||
constexpr int KEY_ACTION_HOLD_DWON = 500;
|
constexpr int KEY_ACTION_HOLD_DWON = 500;
|
||||||
constexpr long int KEY_NOT_PRESSING = -1;
|
constexpr long int KEY_NOT_PRESSING = -1;
|
||||||
enum class KeyHalEvent
|
enum class KeyHalEvent
|
||||||
|
|
Loading…
Reference in New Issue
Block a user