mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-29 08:46:11 +02:00
0.7.62
* add timeout before payload is tried to process (necessary for HMS/HMT)
This commit is contained in:
parent
dae638f7c6
commit
41ade24538
5 changed files with 9 additions and 8 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
## 0.7.62 - 2023-10-01
|
||||
* fix communication to inverters #1198
|
||||
* add timeout before payload is tried to process (necessary for HMS/HMT)
|
||||
|
||||
## 0.7.61 - 2023-10-01
|
||||
* merged `hmPayload` and `hmsPayload` into single class
|
||||
|
|
|
@ -133,10 +133,10 @@ void app::loop(void) {
|
|||
DBGPRINT(F("dBm | "));
|
||||
ah::dumpBuf(p->packet, p->len);
|
||||
}
|
||||
mNrfStat.frmCnt++;
|
||||
|
||||
Inverter<> *iv = mSys.findInverter(&p->packet[1]);
|
||||
if (NULL != iv) {
|
||||
iv->radioStatistics.frmCnt++;
|
||||
if (IV_MI == iv->ivGen)
|
||||
mMiPayload.add(iv, p);
|
||||
else
|
||||
|
@ -160,10 +160,10 @@ void app::loop(void) {
|
|||
DBGPRINT(F("dBm | "));
|
||||
ah::dumpBuf(p->packet, p->len);
|
||||
}
|
||||
mCmtStat.frmCnt++;
|
||||
|
||||
Inverter<> *iv = mSys.findInverter(&p->packet[1]);
|
||||
if(NULL != iv) {
|
||||
iv->radioStatistics.frmCnt++;
|
||||
if((iv->ivGen == IV_HMS) || (iv->ivGen == IV_HMT))
|
||||
mPayload.add(iv, p);
|
||||
}
|
||||
|
@ -515,9 +515,6 @@ void app::resetSystem(void) {
|
|||
mSaveReboot = false;
|
||||
|
||||
mNetworkConnected = false;
|
||||
|
||||
memset(&mNrfStat, 0, sizeof(statistics_t));
|
||||
memset(&mCmtStat, 0, sizeof(statistics_t));
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
@ -334,9 +334,6 @@ class app : public IApp, public ah::Scheduler {
|
|||
|
||||
bool mNetworkConnected;
|
||||
|
||||
statistics_t mNrfStat;
|
||||
statistics_t mCmtStat;
|
||||
|
||||
// mqtt
|
||||
PubMqttType mMqtt;
|
||||
bool mMqttReconnect;
|
||||
|
|
|
@ -173,6 +173,7 @@ class Inverter {
|
|||
alarmCnt = 0;
|
||||
alarmLastId = 0;
|
||||
rssi = -127;
|
||||
memset(&radioStatistics, 0, sizeof(statistics_t));
|
||||
}
|
||||
|
||||
~Inverter() {
|
||||
|
|
|
@ -31,6 +31,7 @@ typedef struct {
|
|||
bool requested;
|
||||
bool gotFragment;
|
||||
bool rxTmo;
|
||||
uint32_t sendMillis;
|
||||
} invPayload_t;
|
||||
|
||||
|
||||
|
@ -247,6 +248,9 @@ class HmPayload {
|
|||
continue; // skip to next inverter
|
||||
}
|
||||
|
||||
if((mPayload[iv->id].sendMillis + 500) > millis())
|
||||
return; // to fast, wait until packets are received!
|
||||
|
||||
if (!mPayload[iv->id].complete) {
|
||||
bool crcPass, pyldComplete, fastNext;
|
||||
|
||||
|
@ -469,6 +473,7 @@ class HmPayload {
|
|||
mPayload[id].requested = false;
|
||||
mPayload[id].ts = *mTimestamp;
|
||||
mPayload[id].rxTmo = setTxTmo; // design: don't start with complete retransmit
|
||||
mPayload[id].sendMillis = millis();
|
||||
}
|
||||
|
||||
IApp *mApp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue