diff --git a/app/src/main/cpp/GPIOControl.cpp b/app/src/main/cpp/GPIOControl.cpp index 3ca58538..f7453d56 100644 --- a/app/src/main/cpp/GPIOControl.cpp +++ b/app/src/main/cpp/GPIOControl.cpp @@ -210,6 +210,10 @@ size_t GpioControl::TurnOn(const std::vector& cmds) m_locker.lock(); for (it = cmds.cbegin(); it != cmds.cend(); ++it) { + if (*it == 0) + { + continue; + } param.cmd = *it; turnOnImpl(param); } diff --git a/app/src/main/cpp/GPIOControl.h b/app/src/main/cpp/GPIOControl.h index 2399ba29..54ceb729 100644 --- a/app/src/main/cpp/GPIOControl.h +++ b/app/src/main/cpp/GPIOControl.h @@ -507,6 +507,21 @@ public: GpioControl::TurnOff(m_cmds, m_delayCloseTime); } + std::string GetStatus() + { + std::string result; + for (auto it = m_cmds.cbegin(); it != m_cmds.cend(); ++it) + { + if (*it == 0) + { + continue; + } + result += std::to_string(*it) + "=" + std::to_string(GpioControl::getInt(*it)) + " "; + } + + return result; + } + protected: void TurnOn() { diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index cd6b2577..099dd117 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -1556,7 +1556,10 @@ bool CPhoneDevice::TakePhotoWithNetCamera(IDevice::PHOTO_INFO& localPhotoInfo, c if (netHandle == 0) { // timeout - XYLOG(XYLOG_SEVERITY_ERROR, "Ethernet not existing CH=%u PR=%X PHOTOID=%u", (uint32_t)localPhotoInfo.channel, (uint32_t)localPhotoInfo.preset, localPhotoInfo.photoId); + std::string pwrStatus = powerCtrlPtr->GetStatus(); + pwrStatus += ethernetPowerCtrl->GetStatus(); + XYLOG(XYLOG_SEVERITY_ERROR, "Ethernet Not Existing CH=%u PR=%X PHOTOID=%u PWR:%s", + (uint32_t)localPhotoInfo.channel, (uint32_t)localPhotoInfo.preset, localPhotoInfo.photoId, pwrStatus.c_str()); TakePhotoCb(0, localPhotoInfo, "", 0); return false; }