fix yield total correction as module (inverter input) value #570

This commit is contained in:
lumapu 2023-02-12 12:40:31 +01:00
parent ca25f16548
commit 32daf4f8ea
3 changed files with 5 additions and 2 deletions

View file

@ -2,6 +2,9 @@
(starting from release version `0.5.66`)
## 0.5.87
* fix yield total correction as module (inverter input) value #570
## 0.5.86
* prevent send devcontrol request during disabled night communication
* changed yield total correction as module (inverter input) value #570

View file

@ -13,7 +13,7 @@
//-------------------------------------
#define VERSION_MAJOR 0
#define VERSION_MINOR 5
#define VERSION_PATCH 86
#define VERSION_PATCH 87
//-------------------------------------
typedef struct {

View file

@ -256,7 +256,7 @@ class Inverter {
// temperature is a signed value!
rec->record[pos] = (REC_TYP)((int16_t)val) / (REC_TYP)(div);
} 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]);
rec->record[pos] = ((REC_TYP)(val) / (REC_TYP)(div)) + ((REC_TYP)config->yieldCor[rec->assign[pos].ch-1]);
} else {
if ((REC_TYP)(div) > 1)
rec->record[pos] = (REC_TYP)(val) / (REC_TYP)(div);