Browse Source

add data request to PowerLimit update req.

pull/1394/head
rejoe2 12 months ago
committed by GitHub
parent
commit
19184727bc
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 7
      src/hm/Communication.h
  2. 5
      src/hm/hmInverter.h

7
src/hm/Communication.h

@ -264,8 +264,10 @@ class Communication : public CommQueue<> {
DBGPRINT(F(" frames missing "));
DBGPRINTLN(F("-> complete retransmit"));
}
mHeu.evalTxChQuality(q->iv, false, (q->attemptsMax - 1 - q->attempts), q->iv->curFrmCnt);
q->iv->radioStatistics.txCnt--;
q->iv->radioStatistics.retransmits++;
mCompleteRetry = true;
mState = States::RESET;
return;
}
@ -511,6 +513,7 @@ class Communication : public CommQueue<> {
} else
DBGPRINTLN(F("-> complete retransmit"));
mCompleteRetry = true;
mState = States::RESET;
return;
}
@ -611,7 +614,7 @@ class Communication : public CommQueue<> {
mHeu.evalTxChQuality(q->iv, crcPass, (q->attemptsMax - 1 - q->attempts), q->iv->curFrmCnt);
if(crcPass)
q->iv->radioStatistics.rxSuccess++;
else if(q->iv->mGotFragment)
else if(q->iv->mGotFragment || mCompleteRetry)
q->iv->radioStatistics.rxFail++; // got no complete payload
else
q->iv->radioStatistics.rxFailNoAnser++; // got nothing
@ -626,6 +629,7 @@ class Communication : public CommQueue<> {
q->iv->mGotLastMsg = false;
q->iv->miMultiParts = 0;
mIsRetransmit = false;
mCompleteRetry = false;
mState = States::RESET;
DBGPRINTLN(F("-----"));
}
@ -1021,6 +1025,7 @@ class Communication : public CommQueue<> {
TimeMonitor mWaitTime = TimeMonitor(0, true); // start as expired (due to code in RESET state)
std::array<frame_t, MAX_PAYLOAD_ENTRIES> mLocalBuf;
bool mFirstTry = false; // see, if we should do a second try
bool mCompleteRetry = false; // remember if we did request a complete retransmission
bool mIsRetransmit = false; // we already had waited one complete cycle
uint8_t mMaxFrameId;
uint8_t mFramesExpected = 12; // 0x8c was highest last frame for alarm data

5
src/hm/hmInverter.h

@ -194,9 +194,10 @@ class Inverter {
if(mNextLive)
cb(RealTimeRunData_Debug, false); // get live data
else {
if(actPowerLimit == 0xffff)
if(actPowerLimit == 0xffff) {
cb(SystemConfigPara, false); // power limit info
else if(InitDataState != devControlCmd) {
cb(RealTimeRunData_Debug, false);
} else if(InitDataState != devControlCmd) {
cb(devControlCmd, false); // custom command which was received by API
devControlCmd = InitDataState;
mGetLossInterval = 1;

Loading…
Cancel
Save