mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-23 22:06:11 +02:00
MI - assure HW part no is there
This commit is contained in:
parent
5fc80f660a
commit
f9857b52ab
2 changed files with 10 additions and 3 deletions
|
@ -210,8 +210,13 @@ class Inverter {
|
||||||
enqueCommand<InfoCommand>(InverterDevInform_Simple); // hardware version
|
enqueCommand<InfoCommand>(InverterDevInform_Simple); // hardware version
|
||||||
enqueCommand<InfoCommand>(RealTimeRunData_Debug); // live data
|
enqueCommand<InfoCommand>(RealTimeRunData_Debug); // live data
|
||||||
} else if (ivGen == IV_MI){
|
} else if (ivGen == IV_MI){
|
||||||
if (getFwVersion() == 0 || getHwVersion() == 0)
|
if (getFwVersion() == 0) {
|
||||||
enqueCommand<InfoCommand>(InverterDevInform_All); // firmware version; might not work, esp. for 1/2 ch hardware
|
enqueCommand<InfoCommand>(InverterDevInform_All); // hard- and firmware version
|
||||||
|
} else {
|
||||||
|
record_t<> *rec = getRecordStruct(InverterDevInform_Simple);
|
||||||
|
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) {
|
if (type == INV_TYPE_4CH) {
|
||||||
enqueCommand<InfoCommand>(0x36);
|
enqueCommand<InfoCommand>(0x36);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -243,7 +243,8 @@ const byteAssign_t InfoAssignment[] = {
|
||||||
}
|
}
|
||||||
record_t<> *rec = iv->getRecordStruct(InverterDevInform_Simple); // choose the record structure
|
record_t<> *rec = iv->getRecordStruct(InverterDevInform_Simple); // choose the record structure
|
||||||
rec->ts = mPayload[iv->id].ts;
|
rec->ts = mPayload[iv->id].ts;
|
||||||
iv->setValue(1, rec, (uint32_t) ((p->packet[24] << 8) + p->packet[25]));
|
iv->setValue(1, rec, (uint32_t) ((p->packet[24] << 8) + p->packet[25])/1);
|
||||||
|
notify(InverterDevInform_All, iv);
|
||||||
//28737
|
//28737
|
||||||
} else if ( p->packet[9] == 0x01 || p->packet[9] == 0x10 ) {//second frame for MI, 3rd gen. answers in 0x10
|
} else if ( p->packet[9] == 0x01 || p->packet[9] == 0x10 ) {//second frame for MI, 3rd gen. answers in 0x10
|
||||||
DPRINT_IVID(DBG_INFO, iv->id);
|
DPRINT_IVID(DBG_INFO, iv->id);
|
||||||
|
@ -277,6 +278,7 @@ const byteAssign_t InfoAssignment[] = {
|
||||||
DPRINT(DBG_INFO,F("Matching_APPFW_PN "));
|
DPRINT(DBG_INFO,F("Matching_APPFW_PN "));
|
||||||
DBGPRINTLN(String((uint32_t) (((p->packet[22] << 8) | p->packet[23]) << 8 | p->packet[24]) << 8 | p->packet[25]));
|
DBGPRINTLN(String((uint32_t) (((p->packet[22] << 8) | p->packet[23]) << 8 | p->packet[24]) << 8 | p->packet[25]));
|
||||||
}
|
}
|
||||||
|
notify(InverterDevInform_Simple, iv);
|
||||||
} else {
|
} else {
|
||||||
DBGPRINTLN(F("3rd gen. inverter!")); // see table in OpenDTU code, DevInfoParser.cpp devInfo[]
|
DBGPRINTLN(F("3rd gen. inverter!")); // see table in OpenDTU code, DevInfoParser.cpp devInfo[]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue