mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-04 19:51:38 +02:00
0.8.20
* improved HM communication #1259 #1249 * fix `loadDefaults` for ethernet builds #1263 * don't loop through radios which aren't in use #1264
This commit is contained in:
parent
5e5d6ab355
commit
689a295d0b
4 changed files with 20 additions and 11 deletions
|
@ -1,5 +1,10 @@
|
|||
# Development Changes
|
||||
|
||||
## 0.8.20 - 2023-12-12
|
||||
* improved HM communication #1259 #1249
|
||||
* fix `loadDefaults` for ethernet builds #1263
|
||||
* don't loop through radios which aren't in use #1264
|
||||
|
||||
## 0.8.19 - 2023-12-11
|
||||
* added ms to serial log
|
||||
* added (debug) option to configure gap between inverter requests
|
||||
|
|
|
@ -67,16 +67,13 @@ typedef struct {
|
|||
bool darkMode;
|
||||
bool schedReboot;
|
||||
|
||||
#if defined(ETHERNET)
|
||||
// ethernet
|
||||
|
||||
#else /* defined(ETHERNET) */
|
||||
#if !defined(ETHERNET)
|
||||
// wifi
|
||||
char stationSsid[SSID_LEN];
|
||||
char stationPwd[PWD_LEN];
|
||||
char apPwd[PWD_LEN];
|
||||
bool isHidden;
|
||||
#endif /* defined(ETHERNET) */
|
||||
#endif /* !defined(ETHERNET) */
|
||||
|
||||
cfgIp_t ip;
|
||||
} cfgSys_t;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//-------------------------------------
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 8
|
||||
#define VERSION_PATCH 19
|
||||
#define VERSION_PATCH 20
|
||||
|
||||
//-------------------------------------
|
||||
typedef struct {
|
||||
|
|
|
@ -51,6 +51,11 @@ class Communication : public CommQueue<> {
|
|||
uint16_t timeout = (q->iv->ivGen == IV_MI) ? MI_TIMEOUT : ((q->iv->mGotFragment && q->iv->mGotLastMsg) || mIsResend) ? SINGLEFR_TIMEOUT : DEFAULT_TIMEOUT;
|
||||
uint16_t timeout_min = (q->iv->ivGen == IV_MI) ? MI_TIMEOUT : ((q->iv->mGotFragment || mIsResend)) ? SINGLEFR_TIMEOUT : FRSTMSG_TIMEOUT;
|
||||
|
||||
/*if(mDebugState != mState) {
|
||||
DPRINT(DBG_INFO, F("State: "));
|
||||
DBGHEXLN((uint8_t)(mState));
|
||||
mDebugState = mState;
|
||||
}*/
|
||||
switch(mState) {
|
||||
case States::RESET:
|
||||
if(millis() < mWaitTimeout)
|
||||
|
@ -99,7 +104,7 @@ class Communication : public CommQueue<> {
|
|||
break;
|
||||
|
||||
case States::WAIT:
|
||||
if(millis() > mWaitTimeout_min) {
|
||||
/*if(millis() > mWaitTimeout_min) {
|
||||
if(mIsResend) { // we already have been through...
|
||||
mWaitTimeout = mWaitTimeout_min;
|
||||
} else if(q->iv->mGotFragment) { // nothing received yet?
|
||||
|
@ -120,7 +125,7 @@ class Communication : public CommQueue<> {
|
|||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}*/
|
||||
if(millis() < mWaitTimeout)
|
||||
return;
|
||||
mState = States::CHECK_FRAMES;
|
||||
|
@ -200,7 +205,7 @@ class Communication : public CommQueue<> {
|
|||
q->iv->radio->mBufCtrl.pop();
|
||||
yield();
|
||||
}
|
||||
if((0 == q->attempts) && (!q->iv->mGotFragment))
|
||||
if(0 == q->attempts)
|
||||
closeRequest(q, false, true);
|
||||
else {
|
||||
if(q->iv->ivGen != IV_MI)
|
||||
|
@ -459,7 +464,7 @@ class Communication : public CommQueue<> {
|
|||
mWaitTimeout = millis() + SINGLEFR_TIMEOUT; // timeout
|
||||
mState = States::WAIT;
|
||||
} else {
|
||||
add(q, true);
|
||||
//add(q, true);
|
||||
closeRequest(q, false, true);
|
||||
}
|
||||
}
|
||||
|
@ -476,7 +481,7 @@ class Communication : public CommQueue<> {
|
|||
}
|
||||
mWaitTimeout = millis() + *mInverterGap;
|
||||
|
||||
cmdDone(delCmd);
|
||||
cmdDone(q->delOnPop);
|
||||
q->iv->mGotFragment = false;
|
||||
q->iv->mGotLastMsg = false;
|
||||
q->iv->miMultiParts = 0;
|
||||
|
@ -839,6 +844,8 @@ class Communication : public CommQueue<> {
|
|||
payloadListenerType mCbPayload = NULL;
|
||||
alarmListenerType mCbAlarm = NULL;
|
||||
Heuristic mHeu;
|
||||
|
||||
//States mDebugState = States::START;
|
||||
};
|
||||
|
||||
#endif /*__COMMUNICATION_H__*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue