|
|
|
@ -1694,20 +1694,27 @@ bool CPhoneDevice::TakePhoto(const IDevice::PHOTO_INFO& photoInfo, const vector<
|
|
|
|
|
}
|
|
|
|
|
else if (mPhotoInfo.mediaType == 0 && (mPhotoInfo.cameraType == CAM_TYPE_SERIAL))
|
|
|
|
|
{
|
|
|
|
|
if (photoInfo.preset != 0 && photoInfo.preset != 0xFF)
|
|
|
|
|
CPhoneDevice* pThis = this;
|
|
|
|
|
IDevice::PHOTO_INFO localPhotoInfo = mPhotoInfo;
|
|
|
|
|
std::thread t([localPhotoInfo, path, pThis]() mutable
|
|
|
|
|
{
|
|
|
|
|
if (localPhotoInfo.preset != 0 && localPhotoInfo.preset != 0xFF)
|
|
|
|
|
{
|
|
|
|
|
CameraPhotoCmd(time(NULL), photoInfo.channel, MOVE_PRESETNO, 0, photoInfo.preset);
|
|
|
|
|
std::this_thread::sleep_for(std::chrono::seconds(2));
|
|
|
|
|
CameraPhotoCmd(time(NULL), localPhotoInfo.channel, MOVE_PRESETNO, 0, localPhotoInfo.preset);
|
|
|
|
|
std::this_thread::sleep_for(std::chrono::seconds(3));
|
|
|
|
|
}
|
|
|
|
|
time_t ts = time(NULL);
|
|
|
|
|
if(!GetPTZSensorsStatus() && !GetCameraStatus())
|
|
|
|
|
if(!pThis->GetPTZSensorsStatus() && !pThis->GetCameraStatus())
|
|
|
|
|
{
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO, "Camera is SeltTesting, selfTestingtime = %d", photoInfo.selfTestingTime);
|
|
|
|
|
OpenPTZSensors(photoInfo.selfTestingTime);
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO, "Camera is SeltTesting, selfTestingtime = %d", localPhotoInfo.selfTestingTime);
|
|
|
|
|
pThis->OpenPTZSensors(localPhotoInfo.selfTestingTime);
|
|
|
|
|
}
|
|
|
|
|
CameraPhotoCmd(ts, photoInfo.channel, 0, photoInfo.resolution, 0);
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO, "Takeing photo over");
|
|
|
|
|
res = TakePTZPhotoCb(3, photoInfo);
|
|
|
|
|
CameraPhotoCmd(ts, localPhotoInfo.channel, 0, localPhotoInfo.resolution, 0);
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO, "Taking photo over");
|
|
|
|
|
pThis->TakePTZPhotoCb(3, localPhotoInfo);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
t.detach();
|
|
|
|
|
}
|
|
|
|
|
else if (mPhotoInfo.usingSysCamera == 1)
|
|
|
|
|
{
|
|
|
|
@ -3496,7 +3503,7 @@ int CPhoneDevice::GetIceData(IDevice::ICE_INFO *iceInfo, IDevice::ICE_TAIL *iceT
|
|
|
|
|
if(airt.AiState == 2)
|
|
|
|
|
{
|
|
|
|
|
iceInfo->t_sensor_data[angleno].deflection_angle = airt.EuValue;
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO,"地址%d, 倾斜角 = %f", sensorParam[num].devaddr, iceInfo->t_sensor_data[angleno].deflection_angle);
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO,"地址%d, x = %f", sensorParam[num].devaddr, iceInfo->t_sensor_data[angleno].deflection_angle);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
iceInfo->t_sensor_data[angleno].deflection_angle = 0xff;
|
|
|
|
@ -3504,7 +3511,7 @@ int CPhoneDevice::GetIceData(IDevice::ICE_INFO *iceInfo, IDevice::ICE_TAIL *iceT
|
|
|
|
|
if(airt.AiState == 2)
|
|
|
|
|
{
|
|
|
|
|
iceInfo->t_sensor_data[angleno].windage_yaw_angle = airt.EuValue;
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO,"地址%d, 风偏角 = %f", sensorParam[num].devaddr, iceInfo->t_sensor_data[angleno].windage_yaw_angle);
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO,"地址%d, y = %f", sensorParam[num].devaddr, iceInfo->t_sensor_data[angleno].windage_yaw_angle);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
iceInfo->t_sensor_data[angleno].windage_yaw_angle =0xff;
|
|
|
|
|