Revert "网络拍照在子类构造函数中调用updatetime"

This reverts commit 1772027e9e.
lowmem
XI.CHEN 4 weeks ago
parent 1772027e9e
commit 1fbb9ffe51

@ -5267,5 +5267,10 @@ VendorCtrl* CPhoneDevice::MakeVendorCtrl(int vendor, uint8_t channel, const std:
// Hang Yu - New
vendorCtrl = new HangYuCtrl(ip, userName, password, channel, netHandle, syncTime);
}
if (syncTime)
{
time_t ts = time(NULL);
vendorCtrl->UpdateTime(ts);
}
return vendorCtrl;
}

@ -12,16 +12,6 @@
#include <cstring>
#include <algorithm>
HangYuCtrl::HangYuCtrl(const std::string& ip, const std::string& userName, const std::string& password, uint8_t channel, net_handle_t netHandle, bool syncTime)
: VendorCtrl(ip, userName, password, channel, netHandle, syncTime)
{
if (syncTime)
{
time_t ts = time(NULL);
UpdateTime(ts);
}
}
HangYuCtrl::~HangYuCtrl()
{

@ -10,7 +10,7 @@
class HangYuCtrl : public VendorCtrl
{
public:
HangYuCtrl(const std::string& ip, const std::string& userName, const std::string& password, uint8_t channel, net_handle_t netHandle, bool syncTime = true);
using VendorCtrl::VendorCtrl;
virtual ~HangYuCtrl();
virtual bool SetOsd(uint8_t channel, std::string osd, uint8_t pos);

@ -12,16 +12,6 @@
#include <cstring>
#include <algorithm>
HikonCtrl::HikonCtrl(const std::string& ip, const std::string& userName, const std::string& password, uint8_t channel, net_handle_t netHandle, bool syncTime)
: VendorCtrl(ip, userName, password, channel, netHandle, syncTime)
{
if (syncTime)
{
time_t ts = time(NULL);
UpdateTime(ts);
}
}
HikonCtrl::~HikonCtrl()
{

@ -10,7 +10,7 @@
class HikonCtrl : public VendorCtrl
{
public:
HikonCtrl(const std::string& ip, const std::string& userName, const std::string& password, uint8_t channel, net_handle_t netHandle, bool syncTime = true);
using VendorCtrl::VendorCtrl;
virtual ~HikonCtrl();
virtual bool SetOsd(uint8_t channel, std::string osd, uint8_t pos);

@ -8,16 +8,6 @@
#include <json/json.h>
YuShiCtrl::YuShiCtrl(const std::string& ip, const std::string& userName, const std::string& password, uint8_t channel, net_handle_t netHandle, bool syncTime)
: VendorCtrl(ip, userName, password, channel, netHandle, syncTime)
{
if (syncTime)
{
time_t ts = time(NULL);
UpdateTime(ts);
}
}
YuShiCtrl::~YuShiCtrl()
{

@ -10,8 +10,7 @@
class YuShiCtrl : public VendorCtrl
{
public:
// using VendorCtrl::VendorCtrl;
YuShiCtrl(const std::string& ip, const std::string& userName, const std::string& password, uint8_t channel, net_handle_t netHandle, bool syncTime = true);
using VendorCtrl::VendorCtrl;
virtual ~YuShiCtrl();
virtual bool SetOsd(uint8_t channel, std::string osd, uint8_t pos);

Loading…
Cancel
Save