Fix MI temperature and AC/total calc

This commit is contained in:
rejoe2 2023-08-16 09:10:28 +02:00 committed by GitHub
parent 670da7cf82
commit 792735421f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 98 deletions

View file

@ -477,7 +477,7 @@ class Inverter {
switch (cmd) {
case RealTimeRunData_Debug:
if (INV_TYPE_1CH == type) {
if(IV_HM == ivGen) {
if(IV_HM == ivGen || IV_MI == ivGen) {
rec->length = (uint8_t)(HM1CH_LIST_LEN);
rec->assign = (byteAssign_t *)hm1chAssignment;
rec->pyldLen = HM1CH_PAYLOAD_LEN;
@ -485,14 +485,14 @@ class Inverter {
rec->length = (uint8_t)(HMS1CH_LIST_LEN);
rec->assign = (byteAssign_t *)hms1chAssignment;
rec->pyldLen = HMS1CH_PAYLOAD_LEN;
} else if(IV_MI == ivGen) {
} /*else if(IV_MI == ivGen) {
rec->length = (uint8_t)(HM1CH_LIST_LEN);
rec->assign = (byteAssign_t *)hm1chAssignment;
}
}*/
channels = 1;
}
else if (INV_TYPE_2CH == type) {
if(IV_HM == ivGen) {
if(IV_HM == ivGen || IV_MI == ivGen) {
rec->length = (uint8_t)(HM2CH_LIST_LEN);
rec->assign = (byteAssign_t *)hm2chAssignment;
rec->pyldLen = HM2CH_PAYLOAD_LEN;
@ -500,14 +500,11 @@ class Inverter {
rec->length = (uint8_t)(HMS2CH_LIST_LEN);
rec->assign = (byteAssign_t *)hms2chAssignment;
rec->pyldLen = HMS2CH_PAYLOAD_LEN;
} else if(IV_MI == ivGen) {
rec->length = (uint8_t)(HM1CH_LIST_LEN);
rec->assign = (byteAssign_t *)hm2chAssignment;
}
channels = 2;
}
else if (INV_TYPE_4CH == type) {
if(IV_HM == ivGen) {
if(IV_HM == ivGen || IV_MI == ivGen) {
rec->length = (uint8_t)(HM4CH_LIST_LEN);
rec->assign = (byteAssign_t *)hm4chAssignment;
rec->pyldLen = HM4CH_PAYLOAD_LEN;
@ -515,9 +512,6 @@ class Inverter {
rec->length = (uint8_t)(HMS4CH_LIST_LEN);
rec->assign = (byteAssign_t *)hms4chAssignment;
rec->pyldLen = HMS4CH_PAYLOAD_LEN;
} else if(IV_MI == ivGen) {
rec->length = (uint8_t)(HM1CH_LIST_LEN);
rec->assign = (byteAssign_t *)hm4chAssignment;
}
channels = 4;
}