Browse Source
small changes in timing for alarmdata
pull/1284/head
rejoe2
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with
23 additions and
4 deletions
-
src/defines.h
-
src/hm/CommQueue.h
-
src/hm/Communication.h
-
src/hm/hmRadio.h
-
src/hms/hmsRadio.h
|
|
@ -13,7 +13,7 @@ |
|
|
|
//-------------------------------------
|
|
|
|
#define VERSION_MAJOR 0 |
|
|
|
#define VERSION_MINOR 8 |
|
|
|
#define VERSION_PATCH 2706 |
|
|
|
#define VERSION_PATCH 2708 |
|
|
|
|
|
|
|
//-------------------------------------
|
|
|
|
typedef struct { |
|
|
|
|
|
@ -78,11 +78,15 @@ class CommQueue { |
|
|
|
cb(true, &mQueue[mRdPtr]); |
|
|
|
} |
|
|
|
|
|
|
|
void cmdDone(bool keep = false) { |
|
|
|
void cmdDone(bool keep = false, bool fastNext = false) { |
|
|
|
if(keep) { |
|
|
|
mQueue[mRdPtr].attempts = 5; |
|
|
|
add(mQueue[mRdPtr]); // add to the end again
|
|
|
|
} /*else if(fastNext) {
|
|
|
|
mQueue[mRdPtr].attempts = 5; |
|
|
|
mQueue[mRdPtr].cmd = RealTimeRunData_Debug; |
|
|
|
} |
|
|
|
if(!fastNext)*/ |
|
|
|
inc(&mRdPtr); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -59,7 +59,8 @@ class Communication : public CommQueue<> { |
|
|
|
mLastEmptyQueueMillis = millis(); |
|
|
|
mPrintSequenceDuration = true; |
|
|
|
|
|
|
|
uint16_t timeout = (q->iv->ivGen == IV_MI) ? MI_TIMEOUT : ((q->iv->mGotFragment && q->iv->mGotLastMsg) || mIsRetransmit) ? SINGLEFR_TIMEOUT : DEFAULT_TIMEOUT; |
|
|
|
uint16_t timeout = (q->iv->ivGen == IV_MI) ? MI_TIMEOUT : ((q->iv->mGotFragment && q->iv->mGotLastMsg) || mIsRetransmit) ? SINGLEFR_TIMEOUT : |
|
|
|
q->cmd != AlarmData ? DEFAULT_TIMEOUT : 1.5 * DEFAULT_TIMEOUT; |
|
|
|
uint16_t timeout_min = (q->iv->ivGen == IV_MI) ? MI_TIMEOUT : ((q->iv->mGotFragment || mIsRetransmit)) ? SINGLEFR_TIMEOUT : FRSTMSG_TIMEOUT; |
|
|
|
|
|
|
|
/*if(mDebugState != mState) {
|
|
|
@ -548,7 +549,15 @@ class Communication : public CommQueue<> { |
|
|
|
if(q->isDevControl) |
|
|
|
keep = !crcPass; |
|
|
|
|
|
|
|
cmdDone(keep); |
|
|
|
bool fastNext = false; |
|
|
|
if(crcPass && q->iv->ivGen != IV_MI && q->cmd != RealTimeRunData_Debug) |
|
|
|
fastNext = true; |
|
|
|
|
|
|
|
cmdDone(keep, fastNext); |
|
|
|
/*if (fastNext)
|
|
|
|
add(q->iv, RealTimeRunData_Debug); |
|
|
|
*/ |
|
|
|
|
|
|
|
q->iv->mGotFragment = false; |
|
|
|
q->iv->mGotLastMsg = false; |
|
|
|
q->iv->miMultiParts = 0; |
|
|
|
|
|
@ -365,6 +365,8 @@ class HmRadio : public Radio { |
|
|
|
} else |
|
|
|
DBGPRINT(F("0x")); |
|
|
|
DHEX(mTxBuf[0]); |
|
|
|
DBGPRINT(F(" 0x")); |
|
|
|
DHEX(mTxBuf[10]); |
|
|
|
DBGPRINT(F(" ")); |
|
|
|
DBGHEXLN(mTxBuf[9]); |
|
|
|
} |
|
|
|
|
|
@ -96,6 +96,10 @@ class CmtRadio : public Radio { |
|
|
|
else |
|
|
|
ah::dumpBuf(mTxBuf, len); |
|
|
|
} else |
|
|
|
DBGPRINT(F("0x")); |
|
|
|
DHEX(mTxBuf[0]); |
|
|
|
DBGPRINT(F(" 0x")); |
|
|
|
DHEX(mTxBuf[10]); |
|
|
|
DBGHEXLN(mTxBuf[9]); |
|
|
|
} |
|
|
|
|
|
|
|