|
|
@ -1019,7 +1019,14 @@ bool CPhoneDevice::QuerySystemProperties(std::map<std::string, std::string>& pro
|
|
|
|
{
|
|
|
|
{
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (val < 3000)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
strcpy(str, "0");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
snprintf(str, sizeof(str), "%.1f", (val / 1000.0));
|
|
|
|
snprintf(str, sizeof(str), "%.1f", (val / 1000.0));
|
|
|
|
|
|
|
|
}
|
|
|
|
it->second = std::string(str);
|
|
|
|
it->second = std::string(str);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1728,22 +1735,7 @@ bool CPhoneDevice::TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c
|
|
|
|
|
|
|
|
|
|
|
|
img.clear();
|
|
|
|
img.clear();
|
|
|
|
netCaptureResult = requestCapture(localPhotoInfo.channel, localPhotoInfo.preset, netPhotoInfo, img);
|
|
|
|
netCaptureResult = requestCapture(localPhotoInfo.channel, localPhotoInfo.preset, netPhotoInfo, img);
|
|
|
|
if (netCaptureResult)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
m_ethernetFailures = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
m_ethernetFailures++;
|
|
|
|
|
|
|
|
if (m_ethernetFailures > 3)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
time_t rebootTime = GetRebootTime();
|
|
|
|
|
|
|
|
if (ts - rebootTime > 1800)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Reboot(REBOOT_TYPE_DEVICE, true, "Ethernet Not Existing");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (netCaptureResult && !img.empty())
|
|
|
|
if (netCaptureResult && !img.empty())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(img.size() <= 1000)
|
|
|
|
if(img.size() <= 1000)
|
|
|
@ -1764,6 +1756,23 @@ bool CPhoneDevice::TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c
|
|
|
|
ethernetPowerCtrl.reset();
|
|
|
|
ethernetPowerCtrl.reset();
|
|
|
|
XYLOG(XYLOG_SEVERITY_DEBUG, "Ethernet Power OFF");
|
|
|
|
XYLOG(XYLOG_SEVERITY_DEBUG, "Ethernet Power OFF");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (netCaptureResult)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
m_ethernetFailures = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
m_ethernetFailures++;
|
|
|
|
|
|
|
|
if (m_ethernetFailures > 3)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
time_t rebootTime = GetRebootTime();
|
|
|
|
|
|
|
|
if (ts - rebootTime > 1800)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Reboot(REBOOT_TYPE_DEVICE, true, "Ethernet Not Existing");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!rgb.empty())
|
|
|
|
if (!rgb.empty())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
time_t takingTime = ts;
|
|
|
|
time_t takingTime = ts;
|
|
|
|