Merge branch 'development03' of https://github.com/rejoe2/ahoy into rejoe2-development03

This commit is contained in:
lumapu 2023-09-20 22:40:55 +02:00
commit cfd73906e4
7 changed files with 115 additions and 60 deletions

View file

@ -212,18 +212,16 @@ class Inverter {
else if((alarmLastId != alarmMesIndex) && (alarmMesIndex != 0))
enqueCommand<InfoCommand>(AlarmData); // alarm not answered
enqueCommand<InfoCommand>(RealTimeRunData_Debug); // live data
} else if (ivGen == IV_MI){
} else { // if (ivGen == IV_MI){
if (getFwVersion() == 0) {
enqueCommand<InfoCommand>(InverterDevInform_All); // hard- and firmware version
} else {
record_t<> *rec = getRecordStruct(InverterDevInform_Simple);
if (getChannelFieldValue(CH0, FLD_PART_NUM, rec) == 0)
if (getChannelFieldValue(CH0, FLD_PART_NUM, rec) == 0) {
enqueCommand<InfoCommand>(InverterDevInform_All); // hard- and firmware version for missing HW part nr, delivered by frame 1
}
if (type == INV_TYPE_4CH) {
enqueCommand<InfoCommand>(0x36);
} else {
enqueCommand<InfoCommand>(0x09);
} else {
enqueCommand<InfoCommand>( type == INV_TYPE_4CH ? 0x36 : 0x09 );
}
}
}
@ -523,10 +521,7 @@ class Inverter {
rec->length = (uint8_t)(HMS1CH_LIST_LEN);
rec->assign = (byteAssign_t *)hms1chAssignment;
rec->pyldLen = HMS1CH_PAYLOAD_LEN;
} /*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) {