Matthew 3 months ago
commit e280e76015

@ -231,6 +231,7 @@ size_t GpioControl::TurnOffImmediately(int cmd)
if (it->references > 0) if (it->references > 0)
{ {
it->references = 0; it->references = 0;
SetCamerastatus(cmd, false);
setInt(it->cmd, 0); setInt(it->cmd, 0);
} }
break; break;
@ -273,6 +274,7 @@ size_t GpioControl::TurnOff(int cmd, uint32_t delayedCloseTime/* = 0*/)
it->references--; it->references--;
if (it->references == 0) if (it->references == 0)
{ {
SetCamerastatus(cmd, false);
setInt(it->cmd, 0); setInt(it->cmd, 0);
} }
} }
@ -319,6 +321,7 @@ size_t GpioControl::TurnOff(const std::vector<int>& cmds, uint32_t delayedCloseT
it->references--; it->references--;
if (it->references == 0) if (it->references == 0)
{ {
SetCamerastatus(it->cmd, false);
setInt(it->cmd, 0); setInt(it->cmd, 0);
} }
} }
@ -361,6 +364,7 @@ size_t GpioControl::TurnOff(const std::vector<std::pair<int, uint32_t> >& cmds)
it->references--; it->references--;
if (it->references == 0) if (it->references == 0)
{ {
SetCamerastatus(it->cmd, false);
setInt(it->cmd, 0); setInt(it->cmd, 0);
} }
} }

@ -5008,6 +5008,7 @@ bool CPhoneDevice::CloseSensors(int sensortype, uint32_t delayedCloseTime)
// GpioControl::TurnOff(CMD_SET_3V3_PWR_ENABLE); // GpioControl::TurnOff(CMD_SET_3V3_PWR_ENABLE);
#ifndef USING_PTZ #ifndef USING_PTZ
#else #else
GpioControl::TurnOff(CMD_SET_5V_PWR_ENABLE, delayedCloseTime);
GpioControl::TurnOff(CMD_SET_PTZ_PWR_ENABLE, delayedCloseTime); GpioControl::TurnOff(CMD_SET_PTZ_PWR_ENABLE, delayedCloseTime);
#endif #endif
#endif #endif

Loading…
Cancel
Save