diff --git a/app/src/main/cpp/GPIOControl.cpp b/app/src/main/cpp/GPIOControl.cpp index 35efa7d4..a4857242 100644 --- a/app/src/main/cpp/GPIOControl.cpp +++ b/app/src/main/cpp/GPIOControl.cpp @@ -231,6 +231,7 @@ size_t GpioControl::TurnOffImmediately(int cmd) if (it->references > 0) { it->references = 0; + SetCamerastatus(cmd, false); setInt(it->cmd, 0); } break; @@ -273,6 +274,7 @@ size_t GpioControl::TurnOff(int cmd, uint32_t delayedCloseTime/* = 0*/) it->references--; if (it->references == 0) { + SetCamerastatus(cmd, false); setInt(it->cmd, 0); } } @@ -319,6 +321,7 @@ size_t GpioControl::TurnOff(const std::vector& cmds, uint32_t delayedCloseT it->references--; if (it->references == 0) { + SetCamerastatus(it->cmd, false); setInt(it->cmd, 0); } } @@ -361,6 +364,7 @@ size_t GpioControl::TurnOff(const std::vector >& cmds) it->references--; if (it->references == 0) { + SetCamerastatus(it->cmd, false); setInt(it->cmd, 0); } } diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index 1bfe1957..ef8b09fd 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -5008,6 +5008,7 @@ bool CPhoneDevice::CloseSensors(int sensortype, uint32_t delayedCloseTime) // GpioControl::TurnOff(CMD_SET_3V3_PWR_ENABLE); #ifndef USING_PTZ #else + GpioControl::TurnOff(CMD_SET_5V_PWR_ENABLE, delayedCloseTime); GpioControl::TurnOff(CMD_SET_PTZ_PWR_ENABLE, delayedCloseTime); #endif #endif