Key function ok on board.

This commit is contained in:
Fancy code 2024-05-28 17:45:12 +08:00
parent 079f480076
commit c3e5571e37
3 changed files with 7 additions and 6 deletions

View File

@ -26,11 +26,11 @@ StatusCode HalCpp::Init(void)
sdCardImpl->Init(); sdCardImpl->Init();
} }
HalMakePtr::GetInstance()->CreateAllKeyHal(mKeys); HalMakePtr::GetInstance()->CreateAllKeyHal(mKeys);
auto checkPinValue = [](std::shared_ptr<HalCpp> impl) { // auto checkPinValue = [](std::shared_ptr<HalCpp> impl) {
LogInfo("HalCpp::CheckAllPinVauleThread start\n"); // LogInfo("HalCpp::CheckAllPinVauleThread start\n");
impl->CheckAllPinVauleThread(); // impl->CheckAllPinVauleThread();
}; // };
mCheckPinThread = std::thread(checkPinValue, shared_from_this()); // mCheckPinThread = std::thread(checkPinValue, shared_from_this());
return CreateStatusCode(STATUS_CODE_OK); return CreateStatusCode(STATUS_CODE_OK);
} }
StatusCode HalCpp::UnInit(void) StatusCode HalCpp::UnInit(void)

View File

@ -95,5 +95,6 @@ StatusCode HalMakePtr::CreateSdCardHal(std::shared_ptr<VSdCardHal> &impl)
} }
StatusCode HalMakePtr::CreateAllKeyHal(std::vector<std::shared_ptr<VKeyControl>> &keys) StatusCode HalMakePtr::CreateAllKeyHal(std::vector<std::shared_ptr<VKeyControl>> &keys)
{ {
LogInfo("STATUS_CODE_VIRTUAL_FUNCTION.\n");
return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION); return CreateStatusCode(STATUS_CODE_VIRTUAL_FUNCTION);
} }

View File

@ -106,6 +106,6 @@ void KeyManager::KeyEventHappened(const std::string &keyName, const VirtualKeyEv
LogError("monitor is nullptr.\n"); LogError("monitor is nullptr.\n");
return; return;
} }
LogInfo("KeyManager::KeyEventHappened: key = %s, event = %d, time = %u\n", keyName.c_str(), event); LogInfo("KeyEventHappened: key = %s, event = %d, time ms = %u\n", keyName.c_str(), event, timeMs);
monitor->KeyEventReport(keyName, static_cast<VirtualKeyEvent>(event), timeMs); monitor->KeyEventReport(keyName, static_cast<VirtualKeyEvent>(event), timeMs);
} }