mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-08 13:41:40 +02:00
Merge branch 'trick-zero-export' into zero-export
This commit is contained in:
commit
fd91ec3a2c
1 changed files with 15 additions and 9 deletions
|
@ -401,6 +401,7 @@ class ZeroExport {
|
|||
mLog["D"] = eTsp - bTsp;
|
||||
}
|
||||
sendLog();
|
||||
clearLog();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -435,6 +436,7 @@ class ZeroExport {
|
|||
mLog["D"] = eTsp - bTsp;
|
||||
}
|
||||
sendLog();
|
||||
clearLog();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -449,9 +451,13 @@ class ZeroExport {
|
|||
return;
|
||||
}
|
||||
|
||||
// if (!iv->isAvailable()) {
|
||||
// return;
|
||||
// }
|
||||
if (!iv->isAvailable()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!iv->isProducing()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (iv->actPowerLimit == 65535) {
|
||||
return;
|
||||
|
@ -466,7 +472,8 @@ class ZeroExport {
|
|||
mLog["g"] = group;
|
||||
mLog["i"] = inv;
|
||||
mLog["id"] = iv->id;
|
||||
mLog["a"] = iv->isAvailable();
|
||||
// mLog["a"] = iv->isAvailable();
|
||||
// mLog["p"] = iv->isProducing();
|
||||
mLog["ivL%"] = iv->actPowerLimit;
|
||||
mLog["ivPm"] = iv->getMaxPower();
|
||||
uint16_t ivL = (iv->getMaxPower() * iv->actPowerLimit) / 100;
|
||||
|
@ -481,6 +488,7 @@ class ZeroExport {
|
|||
mLog["D"] = eTsp - bTsp;
|
||||
}
|
||||
sendLog();
|
||||
clearLog();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -516,6 +524,7 @@ class ZeroExport {
|
|||
|
||||
mLog["Msg"] = obj;
|
||||
sendLog();
|
||||
clearLog();
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -1494,10 +1503,6 @@ class ZeroExport {
|
|||
|
||||
mCfg->groups[group].lastRun = *tsp;
|
||||
|
||||
*doLog = true;
|
||||
|
||||
return true;
|
||||
|
||||
if (mMqtt->isConnected()) {
|
||||
DynamicJsonDocument doc(512);
|
||||
JsonObject obj = doc.to<JsonObject>();
|
||||
|
@ -1575,7 +1580,8 @@ class ZeroExport {
|
|||
*/
|
||||
void sendLog(void) {
|
||||
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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue