Browse Source

Bugfix powermeter_dev, log

pull/1581/head
Patrick Amrhein 1 year ago
parent
commit
fe7863bbf5
  1. 5
      src/plugins/zeroExport/zeroExport.h

5
src/plugins/zeroExport/zeroExport.h

@ -139,7 +139,7 @@ class ZeroExport {
cfgGroup->state = zeroExportState::CONTROLLER; cfgGroup->state = zeroExportState::CONTROLLER;
#if defined(ZEROEXPORT_DEV_POWERMETER) #if defined(ZEROEXPORT_DEV_POWERMETER)
cfgGroup->lastRefresh = millis(); cfgGroup->lastRefresh = millis();
cfgGroup->state = zeroExportState::PUBLISH; cfgGroup->state = zeroExportState::WAITREFRESH;
#endif #endif
} else { } else {
cfgGroup->wait = 3000; cfgGroup->wait = 3000;
@ -433,7 +433,7 @@ class ZeroExport {
// Calculate // Calculate
int32_t ivLp = iv->actPowerLimit; int32_t ivLp = iv->actPowerLimit;
int32_t ivPm = iv->getMaxPower(); int32_t ivPm = iv->getMaxPower();
;
int32_t ivL = (ivPm * ivLp) / 100; int32_t ivL = (ivPm * ivLp) / 100;
int32_t zeL = mCfg->groups[group].inverters[inv].limit; int32_t zeL = mCfg->groups[group].inverters[inv].limit;
@ -843,6 +843,7 @@ class ZeroExport {
mCfg->groups[group].lastRun = *tsp; mCfg->groups[group].lastRun = *tsp;
if (mCfg->debug) mLog["t"] = "groupGetPowermeter"; if (mCfg->debug) mLog["t"] = "groupGetPowermeter";
mLog["g"] = group;
*doLog = true; *doLog = true;
mCfg->groups[group].pm_P = mPowermeter.getDataAVG(group).P; mCfg->groups[group].pm_P = mPowermeter.getDataAVG(group).P;

Loading…
Cancel
Save