Browse Source

small changes in timing for alarmdata

pull/1284/head
rejoe2 2 years ago
committed by GitHub
parent
commit
f779062993
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/defines.h
  2. 6
      src/hm/CommQueue.h
  3. 13
      src/hm/Communication.h
  4. 2
      src/hm/hmRadio.h
  5. 4
      src/hms/hmsRadio.h

2
src/defines.h

@ -13,7 +13,7 @@
//------------------------------------- //-------------------------------------
#define VERSION_MAJOR 0 #define VERSION_MAJOR 0
#define VERSION_MINOR 8 #define VERSION_MINOR 8
#define VERSION_PATCH 2706 #define VERSION_PATCH 2708
//------------------------------------- //-------------------------------------
typedef struct { typedef struct {

6
src/hm/CommQueue.h

@ -78,11 +78,15 @@ class CommQueue {
cb(true, &mQueue[mRdPtr]); cb(true, &mQueue[mRdPtr]);
} }
void cmdDone(bool keep = false) { void cmdDone(bool keep = false, bool fastNext = false) {
if(keep) { if(keep) {
mQueue[mRdPtr].attempts = 5; mQueue[mRdPtr].attempts = 5;
add(mQueue[mRdPtr]); // add to the end again add(mQueue[mRdPtr]); // add to the end again
} /*else if(fastNext) {
mQueue[mRdPtr].attempts = 5;
mQueue[mRdPtr].cmd = RealTimeRunData_Debug;
} }
if(!fastNext)*/
inc(&mRdPtr); inc(&mRdPtr);
} }

13
src/hm/Communication.h

@ -59,7 +59,8 @@ class Communication : public CommQueue<> {
mLastEmptyQueueMillis = millis(); mLastEmptyQueueMillis = millis();
mPrintSequenceDuration = true; 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; uint16_t timeout_min = (q->iv->ivGen == IV_MI) ? MI_TIMEOUT : ((q->iv->mGotFragment || mIsRetransmit)) ? SINGLEFR_TIMEOUT : FRSTMSG_TIMEOUT;
/*if(mDebugState != mState) { /*if(mDebugState != mState) {
@ -548,7 +549,15 @@ class Communication : public CommQueue<> {
if(q->isDevControl) if(q->isDevControl)
keep = !crcPass; 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->mGotFragment = false;
q->iv->mGotLastMsg = false; q->iv->mGotLastMsg = false;
q->iv->miMultiParts = 0; q->iv->miMultiParts = 0;

2
src/hm/hmRadio.h

@ -365,6 +365,8 @@ class HmRadio : public Radio {
} else } else
DBGPRINT(F("0x")); DBGPRINT(F("0x"));
DHEX(mTxBuf[0]); DHEX(mTxBuf[0]);
DBGPRINT(F(" 0x"));
DHEX(mTxBuf[10]);
DBGPRINT(F(" ")); DBGPRINT(F(" "));
DBGHEXLN(mTxBuf[9]); DBGHEXLN(mTxBuf[9]);
} }

4
src/hms/hmsRadio.h

@ -96,6 +96,10 @@ class CmtRadio : public Radio {
else else
ah::dumpBuf(mTxBuf, len); ah::dumpBuf(mTxBuf, len);
} else } else
DBGPRINT(F("0x"));
DHEX(mTxBuf[0]);
DBGPRINT(F(" 0x"));
DHEX(mTxBuf[10]);
DBGHEXLN(mTxBuf[9]); DBGHEXLN(mTxBuf[9]);
} }

Loading…
Cancel
Save