|
|
|
@ -1696,11 +1696,14 @@ bool CPhoneDevice::TakePhoto(const IDevice::PHOTO_INFO& photoInfo, const vector<
|
|
|
|
|
{
|
|
|
|
|
CPhoneDevice* pThis = this;
|
|
|
|
|
IDevice::PHOTO_INFO localPhotoInfo = mPhotoInfo;
|
|
|
|
|
std::thread t([localPhotoInfo, path, pThis]() mutable
|
|
|
|
|
IDevice::SerialsPhotoParam param = { "", 0, 0 };
|
|
|
|
|
GetPhotoSerialsParamCb(param);
|
|
|
|
|
|
|
|
|
|
std::thread t([localPhotoInfo, param, pThis]() mutable
|
|
|
|
|
{
|
|
|
|
|
if (localPhotoInfo.preset != 0 && localPhotoInfo.preset != 0xFF)
|
|
|
|
|
{
|
|
|
|
|
//CameraPhotoCmd(time(NULL), localPhotoInfo.channel, MOVE_PRESETNO, 0, 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(3));
|
|
|
|
|
}
|
|
|
|
|
time_t ts = time(NULL);
|
|
|
|
@ -1709,7 +1712,7 @@ bool CPhoneDevice::TakePhoto(const IDevice::PHOTO_INFO& photoInfo, const vector<
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO, "Camera is SeltTesting, selfTestingtime = %d", localPhotoInfo.selfTestingTime);
|
|
|
|
|
pThis->OpenPTZSensors(localPhotoInfo.selfTestingTime);
|
|
|
|
|
}
|
|
|
|
|
//CameraPhotoCmd(ts, localPhotoInfo.channel, 0, localPhotoInfo.resolution, 0);
|
|
|
|
|
CameraPhotoCmd(ts, localPhotoInfo.channel, 0, localPhotoInfo.resolution, 0, param.serfile, param.baud, param.addr);
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO, "Taking photo over");
|
|
|
|
|
pThis->TakePTZPhotoCb(3, localPhotoInfo);
|
|
|
|
|
});
|
|
|
|
@ -3489,32 +3492,32 @@ int CPhoneDevice::GetIceData(IDevice::ICE_INFO *iceInfo, IDevice::ICE_TAIL *iceT
|
|
|
|
|
if(sensorParam[num].SensorsType == RALLY_PROTOCOL)
|
|
|
|
|
{
|
|
|
|
|
GetPullValue(num, &airt);
|
|
|
|
|
if(airt.AiState == 2)
|
|
|
|
|
{
|
|
|
|
|
// if(airt.AiState == 2)
|
|
|
|
|
// {
|
|
|
|
|
iceInfo->t_sensor_data[pullno].original_tension = airt.EuValue;
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO,"地址%d, 拉力 = %f", sensorParam[num].devaddr, iceInfo->t_sensor_data[pullno].original_tension);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
iceInfo->t_sensor_data[pullno].original_tension = 0xff;
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO,"地址%d, 采样状态 = %d, 拉力 = %f", sensorParam[num].devaddr, airt.AiState, iceInfo->t_sensor_data[pullno].original_tension);
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// iceInfo->t_sensor_data[pullno].original_tension = 0xff;
|
|
|
|
|
pullno++;
|
|
|
|
|
} else if(sensorParam[num].SensorsType == SLANT_PROTOCOL)
|
|
|
|
|
{
|
|
|
|
|
GetAngleValue(num, &airt, 0);
|
|
|
|
|
if(airt.AiState == 2)
|
|
|
|
|
{
|
|
|
|
|
// if(airt.AiState == 2)
|
|
|
|
|
// {
|
|
|
|
|
iceInfo->t_sensor_data[angleno].deflection_angle = airt.EuValue;
|
|
|
|
|
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;
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO,"地址%d, 采样状态 = %d, x = %f", sensorParam[num].devaddr, airt.AiState, iceInfo->t_sensor_data[angleno].deflection_angle);
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// iceInfo->t_sensor_data[angleno].deflection_angle = 0xff;
|
|
|
|
|
GetAngleValue(num, &airt, 1);
|
|
|
|
|
if(airt.AiState == 2)
|
|
|
|
|
{
|
|
|
|
|
// if(airt.AiState == 2)
|
|
|
|
|
// {
|
|
|
|
|
iceInfo->t_sensor_data[angleno].windage_yaw_angle = airt.EuValue;
|
|
|
|
|
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;
|
|
|
|
|
XYLOG(XYLOG_SEVERITY_INFO,"地址%d, 采样状态 = %d, y = %f", sensorParam[num].devaddr, airt.AiState, iceInfo->t_sensor_data[angleno].windage_yaw_angle);
|
|
|
|
|
// }
|
|
|
|
|
// else
|
|
|
|
|
// iceInfo->t_sensor_data[angleno].windage_yaw_angle =0xff;
|
|
|
|
|
angleno++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|