mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-10 22:51:36 +02:00
0.8.103..13
This commit is contained in:
parent
1cf836fbfc
commit
cef417c555
3 changed files with 21 additions and 14 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue