XI.CHEN 2 months ago
commit c51fb6924b

@ -5,7 +5,7 @@ plugins {
// 10,00,000 major-minor-build // 10,00,000 major-minor-build
def AppMajorVersion = 1 def AppMajorVersion = 1
def AppMinorVersion = 3 def AppMinorVersion = 3
def AppBuildNumber = 135 def AppBuildNumber = 136
def AppVersionName = AppMajorVersion + "." + AppMinorVersion + "." + AppBuildNumber def AppVersionName = AppMajorVersion + "." + AppMinorVersion + "." + AppBuildNumber
def AppVersionCode = AppMajorVersion * 100000 + AppMinorVersion * 1000 + AppBuildNumber def AppVersionCode = AppMajorVersion * 100000 + AppMinorVersion * 1000 + AppBuildNumber

@ -544,6 +544,7 @@ Java_com_xypower_mpapp_MicroPhotoService_sendHeartbeat(
pTerminal->SendHeartbeat(); pTerminal->SendHeartbeat();
#ifdef OUTPUT_DBG_INFO #ifdef OUTPUT_DBG_INFO
#if 0
std::thread t([]() std::thread t([]()
{ {
time_t ts = time(NULL); time_t ts = time(NULL);
@ -557,6 +558,7 @@ Java_com_xypower_mpapp_MicroPhotoService_sendHeartbeat(
}); });
t.detach(); t.detach();
#endif
#endif #endif
return JNI_TRUE; return JNI_TRUE;

@ -1019,7 +1019,14 @@ bool CPhoneDevice::QuerySystemProperties(std::map<std::string, std::string>& pro
{ {
continue; continue;
} }
snprintf(str, sizeof(str), "%.1f", (val / 1000.0)); if (val < 3000)
{
strcpy(str, "0");
}
else
{
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;

@ -1367,6 +1367,7 @@ void NdkCamera::onImageAvailable(AImageReader* reader)
mstatus = AImage_getTimestamp(image, &frameTs); mstatus = AImage_getTimestamp(image, &frameTs);
#ifdef OUTPUT_DBG_INFO #ifdef OUTPUT_DBG_INFO
#if 0
if (mWidth == 1920) if (mWidth == 1920)
{ {
std::string dt = FormatLocalDateTime("%d%02d%02d%02d%02d%02d", time(NULL)); std::string dt = FormatLocalDateTime("%d%02d%02d%02d%02d%02d", time(NULL));
@ -1374,6 +1375,7 @@ void NdkCamera::onImageAvailable(AImageReader* reader)
fileName += "_" + mCameraId + std::to_string(frameTs) + ".yuv"; fileName += "_" + mCameraId + std::to_string(frameTs) + ".yuv";
saveYuvToFile(image, fileName.c_str()); saveYuvToFile(image, fileName.c_str());
} }
#endif
#endif #endif
AImage_delete(image); AImage_delete(image);

Loading…
Cancel
Save