mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-09 14:11:39 +02:00
Optimize
This commit is contained in:
parent
5afc97f7f8
commit
3736bff9ab
1 changed files with 15 additions and 9 deletions
|
@ -401,6 +401,7 @@ class ZeroExport {
|
||||||
mLog["D"] = eTsp - bTsp;
|
mLog["D"] = eTsp - bTsp;
|
||||||
}
|
}
|
||||||
sendLog();
|
sendLog();
|
||||||
|
clearLog();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -435,6 +436,7 @@ class ZeroExport {
|
||||||
mLog["D"] = eTsp - bTsp;
|
mLog["D"] = eTsp - bTsp;
|
||||||
}
|
}
|
||||||
sendLog();
|
sendLog();
|
||||||
|
clearLog();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -449,9 +451,13 @@ class ZeroExport {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (!iv->isAvailable()) {
|
if (!iv->isAvailable()) {
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
if (!iv->isProducing()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (iv->actPowerLimit == 65535) {
|
if (iv->actPowerLimit == 65535) {
|
||||||
return;
|
return;
|
||||||
|
@ -466,7 +472,8 @@ class ZeroExport {
|
||||||
mLog["g"] = group;
|
mLog["g"] = group;
|
||||||
mLog["i"] = inv;
|
mLog["i"] = inv;
|
||||||
mLog["id"] = iv->id;
|
mLog["id"] = iv->id;
|
||||||
mLog["a"] = iv->isAvailable();
|
// mLog["a"] = iv->isAvailable();
|
||||||
|
// mLog["p"] = iv->isProducing();
|
||||||
mLog["ivL%"] = iv->actPowerLimit;
|
mLog["ivL%"] = iv->actPowerLimit;
|
||||||
mLog["ivPm"] = iv->getMaxPower();
|
mLog["ivPm"] = iv->getMaxPower();
|
||||||
uint16_t ivL = (iv->getMaxPower() * iv->actPowerLimit) / 100;
|
uint16_t ivL = (iv->getMaxPower() * iv->actPowerLimit) / 100;
|
||||||
|
@ -481,6 +488,7 @@ class ZeroExport {
|
||||||
mLog["D"] = eTsp - bTsp;
|
mLog["D"] = eTsp - bTsp;
|
||||||
}
|
}
|
||||||
sendLog();
|
sendLog();
|
||||||
|
clearLog();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -502,6 +510,7 @@ class ZeroExport {
|
||||||
|
|
||||||
mLog["MQTT"] = obj;
|
mLog["MQTT"] = obj;
|
||||||
sendLog();
|
sendLog();
|
||||||
|
clearLog();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -1480,10 +1489,6 @@ class ZeroExport {
|
||||||
|
|
||||||
mCfg->groups[group].lastRun = *tsp;
|
mCfg->groups[group].lastRun = *tsp;
|
||||||
|
|
||||||
*doLog = true;
|
|
||||||
|
|
||||||
return true;
|
|
||||||
|
|
||||||
if (mMqtt->isConnected()) {
|
if (mMqtt->isConnected()) {
|
||||||
DynamicJsonDocument doc(512);
|
DynamicJsonDocument doc(512);
|
||||||
JsonObject obj = doc.to<JsonObject>();
|
JsonObject obj = doc.to<JsonObject>();
|
||||||
|
@ -1553,7 +1558,8 @@ class ZeroExport {
|
||||||
*/
|
*/
|
||||||
void sendLog(void) {
|
void sendLog(void) {
|
||||||
if (mCfg->log_over_webserial) {
|
if (mCfg->log_over_webserial) {
|
||||||
DBGPRINTLN(String("ze: ") + mDocLog.as<String>());
|
// DBGPRINTLN(String("ze: ") + mDocLog.as<String>());
|
||||||
|
DPRINTLN(DBG_INFO, String("ze: ") + mDocLog.as<String>());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mCfg->log_over_mqtt) {
|
if (mCfg->log_over_mqtt) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue