优化日志

heatbeat
Matthew 3 months ago
parent 295aadfc16
commit a9145e8871

@ -1158,16 +1158,11 @@ bool CPhoneDevice::Reboot(int resetType, bool manually, const std::string& reaso
return false;
}
}
std::thread t([manually, timeout]()
{
XYLOG(XYLOG_SEVERITY_WARNING, "Recv REBOOT command Manually=%d", manually ? 1 : 0);
std::this_thread::sleep_for(std::chrono::milliseconds(timeout));
if (manually)
{
GpioControl::reboot();
}
});
t.detach();
if (manually)
{
// GpioControl::reboot();
RestartApp(resetType, timeout, reason);
}
}
else
{
@ -1348,15 +1343,12 @@ void CPhoneDevice::handleRebootTimer(union sigval v)
}
#endif
CPhoneDevice* pDevice = (CPhoneDevice*)(v.sival_ptr);
const IDevice::PHOTO_INFO& photoInfo = pDevice->mPhotoInfo;
// Reboot APP
XYLOG(XYLOG_SEVERITY_ERROR, "Camera Close Thread is DEAD, will RESTART app");
pDevice->RestartApp(REBOOT_TYPE_APP, 30000, "Camera Can't Close");
XYLOG(XYLOG_SEVERITY_ERROR, "Camera Close Thread is DEAD, will RESTART app CH=%u PR=%X", photoInfo->channel, photoInfo->preset);
pDevice->RestartApp(REBOOT_TYPE_APP, 30000, "Camera Cant Close");
}
// void CPhoneDevice::handleRebootTimerImpl()
// {
// }
IDevice::timer_uid_t CPhoneDevice::RegisterTimer(unsigned int timerType, unsigned int timeout, void* data, uint64_t times/* = 0*/)
{
struct sigevent evp = { 0 };

Loading…
Cancel
Save