|
@ -1177,14 +1177,14 @@ class ZeroExport { |
|
|
// Wait
|
|
|
// Wait
|
|
|
if (cfgGroupInv->waitRebootAck > 0) { |
|
|
if (cfgGroupInv->waitRebootAck > 0) { |
|
|
result = false; |
|
|
result = false; |
|
|
if (!mCfg->debug) *doLog = true; |
|
|
if (mCfg->debug) *doLog = true; |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Reset
|
|
|
// Reset
|
|
|
if ((cfgGroupInv->doReboot == 2) && (cfgGroupInv->waitRebootAck == 0)) { |
|
|
if ((cfgGroupInv->doReboot == 2) && (cfgGroupInv->waitRebootAck == 0)) { |
|
|
cfgGroupInv->doReboot = -1; |
|
|
cfgGroupInv->doReboot = -1; |
|
|
if (!mCfg->debug) { |
|
|
if (mCfg->debug) { |
|
|
logObj["act"] = "done"; |
|
|
logObj["act"] = "done"; |
|
|
*doLog = true; |
|
|
*doLog = true; |
|
|
} |
|
|
} |
|
@ -1199,7 +1199,7 @@ class ZeroExport { |
|
|
|
|
|
|
|
|
// Inverter nothing to do -> ignore
|
|
|
// Inverter nothing to do -> ignore
|
|
|
if (cfgGroupInv->doReboot == -1) { |
|
|
if (cfgGroupInv->doReboot == -1) { |
|
|
if (!mCfg->debug) { |
|
|
if (mCfg->debug) { |
|
|
logObj["act"] = "nothing to do"; |
|
|
logObj["act"] = "nothing to do"; |
|
|
*doLog = true; |
|
|
*doLog = true; |
|
|
} |
|
|
} |
|
@ -1216,7 +1216,7 @@ class ZeroExport { |
|
|
obj["path"] = "ctrl"; |
|
|
obj["path"] = "ctrl"; |
|
|
obj["cmd"] = "restart"; |
|
|
obj["cmd"] = "restart"; |
|
|
mApi->ctrlRequest(obj); |
|
|
mApi->ctrlRequest(obj); |
|
|
if (!mCfg->debug) logObj["d"] = obj; |
|
|
if (mCfg->debug) logObj["d"] = obj; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return result; |
|
|
return result; |
|
@ -1259,14 +1259,14 @@ class ZeroExport { |
|
|
// Wait
|
|
|
// Wait
|
|
|
if (cfgGroupInv->waitPowerAck > 0) { |
|
|
if (cfgGroupInv->waitPowerAck > 0) { |
|
|
result = false; |
|
|
result = false; |
|
|
if (!mCfg->debug) *doLog = true; |
|
|
if (mCfg->debug) *doLog = true; |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Reset
|
|
|
// Reset
|
|
|
if ((cfgGroupInv->doPower != -1) && (cfgGroupInv->waitPowerAck == 0)) { |
|
|
if ((cfgGroupInv->doPower != -1) && (cfgGroupInv->waitPowerAck == 0)) { |
|
|
cfgGroupInv->doPower = -1; |
|
|
cfgGroupInv->doPower = -1; |
|
|
if (!mCfg->debug) { |
|
|
if (mCfg->debug) { |
|
|
logObj["act"] = "done"; |
|
|
logObj["act"] = "done"; |
|
|
*doLog = true; |
|
|
*doLog = true; |
|
|
} |
|
|
} |
|
@ -1299,7 +1299,7 @@ class ZeroExport { |
|
|
|
|
|
|
|
|
// Inverter nothing to do -> ignore
|
|
|
// Inverter nothing to do -> ignore
|
|
|
if (cfgGroupInv->doPower == -1) { |
|
|
if (cfgGroupInv->doPower == -1) { |
|
|
if (!mCfg->debug) { |
|
|
if (mCfg->debug) { |
|
|
logObj["act"] = "nothing to do"; |
|
|
logObj["act"] = "nothing to do"; |
|
|
*doLog = true; |
|
|
*doLog = true; |
|
|
} |
|
|
} |
|
@ -1317,7 +1317,7 @@ class ZeroExport { |
|
|
obj["path"] = "ctrl"; |
|
|
obj["path"] = "ctrl"; |
|
|
obj["cmd"] = "power"; |
|
|
obj["cmd"] = "power"; |
|
|
mApi->ctrlRequest(obj); |
|
|
mApi->ctrlRequest(obj); |
|
|
if (!mCfg->debug) logObj["d"] = obj; |
|
|
if (mCfg->debug) logObj["d"] = obj; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return result; |
|
|
return result; |
|
@ -1361,14 +1361,14 @@ class ZeroExport { |
|
|
// Wait
|
|
|
// Wait
|
|
|
if (cfgGroupInv->waitLimitAck > 0) { |
|
|
if (cfgGroupInv->waitLimitAck > 0) { |
|
|
result = false; |
|
|
result = false; |
|
|
if (!mCfg->debug) *doLog = true; |
|
|
if (mCfg->debug) *doLog = true; |
|
|
continue; |
|
|
continue; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// Reset
|
|
|
// Reset
|
|
|
if ((cfgGroupInv->doLimit != -1) && (cfgGroupInv->waitLimitAck == 0)) { |
|
|
if ((cfgGroupInv->doLimit != -1) && (cfgGroupInv->waitLimitAck == 0)) { |
|
|
cfgGroupInv->doLimit = -1; |
|
|
cfgGroupInv->doLimit = -1; |
|
|
if (!mCfg->debug) { |
|
|
if (mCfg->debug) { |
|
|
logObj["act"] = "done"; |
|
|
logObj["act"] = "done"; |
|
|
*doLog = true; |
|
|
*doLog = true; |
|
|
} |
|
|
} |
|
@ -1429,7 +1429,7 @@ class ZeroExport { |
|
|
|
|
|
|
|
|
// Inverter nothing to do -> ignore
|
|
|
// Inverter nothing to do -> ignore
|
|
|
if (cfgGroupInv->doLimit == -1) { |
|
|
if (cfgGroupInv->doLimit == -1) { |
|
|
if (!mCfg->debug) { |
|
|
if (mCfg->debug) { |
|
|
logObj["act"] = "nothing to do"; |
|
|
logObj["act"] = "nothing to do"; |
|
|
*doLog = true; |
|
|
*doLog = true; |
|
|
} |
|
|
} |
|
@ -1451,7 +1451,7 @@ class ZeroExport { |
|
|
obj["path"] = "ctrl"; |
|
|
obj["path"] = "ctrl"; |
|
|
obj["cmd"] = "limit_nonpersistent_absolute"; |
|
|
obj["cmd"] = "limit_nonpersistent_absolute"; |
|
|
mApi->ctrlRequest(obj); |
|
|
mApi->ctrlRequest(obj); |
|
|
if (!mCfg->debug) logObj["d"] = obj; |
|
|
if (mCfg->debug) logObj["d"] = obj; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return result; |
|
|
return result; |
|
|