prevent send devcontrol request during disabled night communication

changed yield total correction as module (inverter input) value #570
MQTT Yield Day zero, next try to fix #671
This commit is contained in:
lumapu 2023-02-12 02:00:54 +01:00
parent a843ab6881
commit ca25f16548
13 changed files with 37 additions and 32 deletions

View file

@ -255,9 +255,8 @@ class Inverter {
if (FLD_T == rec->assign[pos].fieldId) {
// temperature is a signed value!
rec->record[pos] = (REC_TYP)((int16_t)val) / (REC_TYP)(div);
} else if ((FLD_YT == rec->assign[pos].fieldId)
&& (config->yieldCor != 0)) {
rec->record[pos] = ((REC_TYP)(val) / (REC_TYP)(div)) - ((REC_TYP)config->yieldCor);
} else if (FLD_YT == rec->assign[pos].fieldId) {
rec->record[pos] = ((REC_TYP)(val) / (REC_TYP)(div)) + ((REC_TYP)config->yieldCor[rec->assign[pos].ch]);
} else {
if ((REC_TYP)(div) > 1)
rec->record[pos] = (REC_TYP)(val) / (REC_TYP)(div);