|
@@ -92,10 +92,10 @@ void DogObject::start()
|
|
|
|
|
|
void DogObject::time_out()
|
|
void DogObject::time_out()
|
|
{
|
|
{
|
|
|
|
+ uint t = QDateTime::currentDateTime().toTime_t();
|
|
if(isWorking)
|
|
if(isWorking)
|
|
return;
|
|
return;
|
|
isWorking = true;
|
|
isWorking = true;
|
|
- uint t = QDateTime::currentDateTime().toTime_t();
|
|
|
|
if(db.isOpen()){
|
|
if(db.isOpen()){
|
|
devConfList.clear();
|
|
devConfList.clear();
|
|
QSqlQuery qry = db.exec("select device_code, comm_type, company_code from ytiot_v_video order by device_code");
|
|
QSqlQuery qry = db.exec("select device_code, comm_type, company_code from ytiot_v_video order by device_code");
|
|
@@ -108,6 +108,7 @@ void DogObject::time_out()
|
|
}else
|
|
}else
|
|
db.open();
|
|
db.open();
|
|
for(int i=0;i<DEVICES_COUNT;i++){
|
|
for(int i=0;i<DEVICES_COUNT;i++){
|
|
|
|
+ t = QDateTime::currentDateTime().toTime_t();
|
|
for(int j=0;j<devConfList.length();j++){
|
|
for(int j=0;j<devConfList.length();j++){
|
|
if(strcmp(ytShm->eHomeDevice[i].deviceID,devConfList.at(j).DeviceId.toUtf8().data())==0)
|
|
if(strcmp(ytShm->eHomeDevice[i].deviceID,devConfList.at(j).DeviceId.toUtf8().data())==0)
|
|
{
|
|
{
|
|
@@ -129,7 +130,7 @@ void DogObject::time_out()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ t = QDateTime::currentDateTime().toTime_t();
|
|
if((t-ytShm->workingTime[0])>15){
|
|
if((t-ytShm->workingTime[0])>15){
|
|
system("killall ytCamCore");
|
|
system("killall ytCamCore");
|
|
system("rm -f /usr/local/nginx/html/hls/*");
|
|
system("rm -f /usr/local/nginx/html/hls/*");
|