|
|
|
@ -1787,16 +1787,17 @@ bool CPhoneDevice::TakePhoto(const IDevice::PHOTO_INFO& photoInfo, const vector<
|
|
|
|
|
|
|
|
|
|
std::thread t([localPhotoInfo, param, pThis, path, osds, wid_serial]() mutable
|
|
|
|
|
{
|
|
|
|
|
time_t ts = time(NULL);
|
|
|
|
|
pThis->OpenPTZSensors(localPhotoInfo.selfTestingTime);
|
|
|
|
|
|
|
|
|
|
if (localPhotoInfo.preset != 0 && localPhotoInfo.preset != 0xFF)
|
|
|
|
|
{
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO,"Recv CameraCtrl Command, action= MOVE_PRESETNO, preset = %u", localPhotoInfo.preset);
|
|
|
|
|
CameraPhotoCmd(time(NULL), localPhotoInfo.channel, MOVE_PRESETNO, 0, localPhotoInfo.preset, param.serfile, param.baud, param.addr);
|
|
|
|
|
std::this_thread::sleep_for(std::chrono::seconds(5));
|
|
|
|
|
}
|
|
|
|
|
time_t ts = time(NULL);
|
|
|
|
|
|
|
|
|
|
pThis->OpenPTZSensors(localPhotoInfo.selfTestingTime);
|
|
|
|
|
|
|
|
|
|
CameraPhotoCmd(ts, localPhotoInfo.channel, 0, localPhotoInfo.resolution, 0, param.serfile, param.baud, param.addr);
|
|
|
|
|
CameraPhotoCmd(ts, localPhotoInfo.channel, 0, localPhotoInfo.resolution, localPhotoInfo.preset, param.serfile, param.baud, param.addr);
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO, "Taking photo over");
|
|
|
|
|
|
|
|
|
|
pThis->ClosePTZSensors(localPhotoInfo.closeDelayTime);
|
|
|
|
|