0.8.103..13

This commit is contained in:
Patrick Amrhein 2024-05-11 21:42:03 +02:00
parent 1cf836fbfc
commit cef417c555
3 changed files with 21 additions and 14 deletions

View file

@ -181,6 +181,9 @@ class ZeroExport {
if ((e < CfgGroup->powerTolerance) && (e > -CfgGroup->powerTolerance)) {
e = 0;
mLog["eK"] = e;
sendLog();
clearLog();
return;
}
// Regler
@ -192,7 +195,12 @@ class ZeroExport {
int16_t yP = Kp * e;
CfgGroup->eSum += e;
int16_t yI = Ki * Ta * CfgGroup->eSum;
if (Ta == 0) return;
if (Ta == 0) {
mLog["Error"] = "Ta = 0";
sendLog();
clearLog();
return;
}
int16_t yD = Kd * (e - CfgGroup->eOld) / Ta;
if (mCfg->debug) {
@ -390,9 +398,6 @@ class ZeroExport {
void tickMidnight(void) {
if ((!mIsInitialized) || (!mCfg->enabled)) return;
// TODO: activate
return;
for (uint8_t group = 0; group < ZEROEXPORT_MAX_GROUPS; group++) {
if (!mCfg->groups[group].enabled) continue;