retransmit review

- look at how many frames are missing first
- more "second try" if inverter is available (dependent on attempts)
This commit is contained in:
rejoe2 2024-01-25 11:10:44 +01:00 committed by GitHub
parent d8af398208
commit 1118407019
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 47 additions and 27 deletions

View file

@ -220,21 +220,21 @@ class Inverter {
cb(RealTimeRunData_Debug, false); // get live data
}
} else { // MI
if(0 == getFwVersion()) {
mIvRxCnt +=2;
cb(0x0f, false); // get firmware version; for MI, this makes part of polling the device software and hardware version number
} else {
record_t<> *rec = getRecordStruct(InverterDevInform_Simple);
if (getChannelFieldValue(CH0, FLD_PART_NUM, rec) == 0) {
cb(0x0f, false); // hard- and firmware version for missing HW part nr, delivered by frame 1
cb(((type == INV_TYPE_4CH) ? MI_REQ_4CH : MI_REQ_CH1), false);
mGetLossInterval++;
if (type != INV_TYPE_4CH)
mIvRxCnt++; // statistics workaround...
if(isAvailable()) {
if(0 == getFwVersion()) {
mIvRxCnt +=2;
} else if((getChannelFieldValue(CH0, FLD_GRID_PROFILE_CODE, rec) == 0) && generalConfig->readGrid) // read grid profile
cb(0x10, false); // legacy GPF command
else {
cb(((type == INV_TYPE_4CH) ? MI_REQ_4CH : MI_REQ_CH1), false);
mGetLossInterval++;
if (type != INV_TYPE_4CH)
mIvRxCnt++; // statistics workaround...
cb(0x0f, false); // get firmware version; for MI, this makes part of polling the device software and hardware version number
} else {
record_t<> *rec = getRecordStruct(InverterDevInform_Simple);
if (getChannelFieldValue(CH0, FLD_PART_NUM, rec) == 0) {
cb(0x0f, false); // hard- and firmware version for missing HW part nr, delivered by frame 1
mIvRxCnt +=2;
} else if((getChannelFieldValue(CH0, FLD_GRID_PROFILE_CODE, rec) == 0) && generalConfig->readGrid) // read grid profile
cb(0x10, false); // legacy GPF command
}
}
}