From 12731b466f6b87da3915349de44e20e61e712038 Mon Sep 17 00:00:00 2001 From: Matthew Date: Thu, 11 Jul 2024 23:58:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=90=AF=E8=AE=BE=E5=A4=87=E5=BB=B6?= =?UTF-8?q?=E8=BF=9F1=E7=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/cpp/PhoneDevice.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index 4d12cba8..2ee786ae 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -780,7 +780,13 @@ bool CPhoneDevice::Reboot(int resetType) if (resetType == REBOOT_TYPE_DEVICE) { // reboot the device - GpioControl::reboot(); + std::thread t([]() + { + std::this_thread::sleep_for(std::chrono::milliseconds(1000)); + GpioControl::reboot(); + }); + t.detach(); + return true; }