mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-07 05:01:39 +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
|
# 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
|
## 0.8.19 - 2023-12-11
|
||||||
* added ms to serial log
|
* added ms to serial log
|
||||||
* added (debug) option to configure gap between inverter requests
|
* added (debug) option to configure gap between inverter requests
|
||||||
|
|
|
@ -67,16 +67,13 @@ typedef struct {
|
||||||
bool darkMode;
|
bool darkMode;
|
||||||
bool schedReboot;
|
bool schedReboot;
|
||||||
|
|
||||||
#if defined(ETHERNET)
|
#if !defined(ETHERNET)
|
||||||
// ethernet
|
|
||||||
|
|
||||||
#else /* defined(ETHERNET) */
|
|
||||||
// wifi
|
// wifi
|
||||||
char stationSsid[SSID_LEN];
|
char stationSsid[SSID_LEN];
|
||||||
char stationPwd[PWD_LEN];
|
char stationPwd[PWD_LEN];
|
||||||
char apPwd[PWD_LEN];
|
char apPwd[PWD_LEN];
|
||||||
bool isHidden;
|
bool isHidden;
|
||||||
#endif /* defined(ETHERNET) */
|
#endif /* !defined(ETHERNET) */
|
||||||
|
|
||||||
cfgIp_t ip;
|
cfgIp_t ip;
|
||||||
} cfgSys_t;
|
} cfgSys_t;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
#define VERSION_MAJOR 0
|
#define VERSION_MAJOR 0
|
||||||
#define VERSION_MINOR 8
|
#define VERSION_MINOR 8
|
||||||
#define VERSION_PATCH 19
|
#define VERSION_PATCH 20
|
||||||
|
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
typedef struct {
|
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 = (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;
|
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) {
|
switch(mState) {
|
||||||
case States::RESET:
|
case States::RESET:
|
||||||
if(millis() < mWaitTimeout)
|
if(millis() < mWaitTimeout)
|
||||||
|
@ -99,7 +104,7 @@ class Communication : public CommQueue<> {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case States::WAIT:
|
case States::WAIT:
|
||||||
if(millis() > mWaitTimeout_min) {
|
/*if(millis() > mWaitTimeout_min) {
|
||||||
if(mIsResend) { // we already have been through...
|
if(mIsResend) { // we already have been through...
|
||||||
mWaitTimeout = mWaitTimeout_min;
|
mWaitTimeout = mWaitTimeout_min;
|
||||||
} else if(q->iv->mGotFragment) { // nothing received yet?
|
} else if(q->iv->mGotFragment) { // nothing received yet?
|
||||||
|
@ -120,7 +125,7 @@ class Communication : public CommQueue<> {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}*/
|
||||||
if(millis() < mWaitTimeout)
|
if(millis() < mWaitTimeout)
|
||||||
return;
|
return;
|
||||||
mState = States::CHECK_FRAMES;
|
mState = States::CHECK_FRAMES;
|
||||||
|
@ -200,7 +205,7 @@ class Communication : public CommQueue<> {
|
||||||
q->iv->radio->mBufCtrl.pop();
|
q->iv->radio->mBufCtrl.pop();
|
||||||
yield();
|
yield();
|
||||||
}
|
}
|
||||||
if((0 == q->attempts) && (!q->iv->mGotFragment))
|
if(0 == q->attempts)
|
||||||
closeRequest(q, false, true);
|
closeRequest(q, false, true);
|
||||||
else {
|
else {
|
||||||
if(q->iv->ivGen != IV_MI)
|
if(q->iv->ivGen != IV_MI)
|
||||||
|
@ -459,7 +464,7 @@ class Communication : public CommQueue<> {
|
||||||
mWaitTimeout = millis() + SINGLEFR_TIMEOUT; // timeout
|
mWaitTimeout = millis() + SINGLEFR_TIMEOUT; // timeout
|
||||||
mState = States::WAIT;
|
mState = States::WAIT;
|
||||||
} else {
|
} else {
|
||||||
add(q, true);
|
//add(q, true);
|
||||||
closeRequest(q, false, true);
|
closeRequest(q, false, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -476,7 +481,7 @@ class Communication : public CommQueue<> {
|
||||||
}
|
}
|
||||||
mWaitTimeout = millis() + *mInverterGap;
|
mWaitTimeout = millis() + *mInverterGap;
|
||||||
|
|
||||||
cmdDone(delCmd);
|
cmdDone(q->delOnPop);
|
||||||
q->iv->mGotFragment = false;
|
q->iv->mGotFragment = false;
|
||||||
q->iv->mGotLastMsg = false;
|
q->iv->mGotLastMsg = false;
|
||||||
q->iv->miMultiParts = 0;
|
q->iv->miMultiParts = 0;
|
||||||
|
@ -839,6 +844,8 @@ class Communication : public CommQueue<> {
|
||||||
payloadListenerType mCbPayload = NULL;
|
payloadListenerType mCbPayload = NULL;
|
||||||
alarmListenerType mCbAlarm = NULL;
|
alarmListenerType mCbAlarm = NULL;
|
||||||
Heuristic mHeu;
|
Heuristic mHeu;
|
||||||
|
|
||||||
|
//States mDebugState = States::START;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /*__COMMUNICATION_H__*/
|
#endif /*__COMMUNICATION_H__*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue